/* WordPress, Contact Form 7 and filter-state additions. ci.css stays identical to the approved design file. */

/* The blog/hub filters toggle the hidden attribute; cards are flex/grid so the attribute needs a hard rule. */
.ci [hidden] { display: none !important; }

/* Footer column headings are h2 (keeps the heading order valid after a page's h2 sections) styled like the design's small labels */
.ci-footer .footer-h { margin: 0 0 18px; font: 600 .85rem var(--ci-font-body); letter-spacing: .01em; line-height: 1.3; color: var(--ci-on-navy-muted); }

/* Accessibility helpers (WordPress conventions) */
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }
.skip-link:focus { clip: auto; clip-path: none; height: auto; width: auto; left: 16px; top: 16px; z-index: 1000; padding: 12px 18px; background: #fff; color: var(--ci-navy); border-radius: 10px; box-shadow: 0 0 0 2px var(--ci-navy); font: 500 1rem var(--ci-font-body); text-decoration: none; }
.ci-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Classic-editor post content inside .prose */
.ci .prose img { height: auto; }  /* width/height attributes from the editor must not fix the height once the width is constrained */
.ci .prose h4 { font-size: 1.15rem; margin-top: 1.4em; }
.ci .prose hr { border: 0; border-top: 1.5px solid var(--ci-border); margin: 2em 0; }
.ci .prose pre { overflow: auto; padding: 16px 20px; border-radius: var(--ci-radius-sm); background: var(--ci-bg-soft); font-size: .9rem; }
.ci .prose code { font-size: .92em; background: var(--ci-bg-soft); padding: 2px 6px; border-radius: 6px; }
.ci .prose pre code { background: none; padding: 0; }
.ci .prose figure { margin: 1.5em 0; }
.ci .prose figure img { margin: 0; }
.ci .prose figcaption, .ci .prose .wp-caption-text { margin-top: 8px; font-size: .88rem; color: var(--ci-muted); text-align: center; }
.ci .prose .wp-caption { max-width: 100%; }
.ci .prose .alignleft { float: left; margin: .4em 1.5em 1em 0; }
.ci .prose .alignright { float: right; margin: .4em 0 1em 1.5em; }
.ci .prose .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.ci .prose iframe, .ci .prose video, .ci .prose embed, .ci .prose object { max-width: 100%; }
.ci .prose .wp-block-table table, .ci .prose .wp-block-image img { max-width: 100%; }
.ci .prose::after { content: ''; display: table; clear: both; }
.ci .prose .page-links { margin-top: 2em; font-weight: 500; }
@media (max-width: 600px) { .ci .prose .alignleft, .ci .prose .alignright { float: none; margin: 1.5em 0; } }

/* Single post: the text stays in the 680px column, but standalone images and captioned figures span the
   whole container, like the cover image. Uses container-query units; older browsers keep the narrow images.
   "p > img:first-child:last-of-type" also matches lazy-loaded images that LiteSpeed follows with a <noscript> copy. */
.ci .post-main { container-type: inline-size; }
@supports (width: 1cqw) {
  .ci .prose--wide-media > img:not(.alignleft):not(.alignright),
  .ci .prose--wide-media > p > img:first-child:last-of-type:not(.alignleft):not(.alignright),
  .ci .prose--wide-media > figure:not(.alignleft):not(.alignright),
  .ci .prose--wide-media > .wp-caption:not(.alignleft):not(.alignright),
  .ci .prose--wide-media > .wp-block-image:not(.alignleft):not(.alignright) {
    width: 100cqw !important; max-width: none; margin-left: calc(50% - 50cqw); margin-right: 0; }
  .ci .prose--wide-media > p > img:first-child:last-of-type:not(.alignleft):not(.alignright) { display: block; }
  .ci .prose--wide-media > figure img, .ci .prose--wide-media > .wp-caption img, .ci .prose--wide-media > .wp-block-image img { width: 100%; height: auto; margin: 0; }
  .ci .prose--wide-media > img, .ci .prose--wide-media > p > img:first-child:last-of-type, .ci .prose--wide-media > figure img, .ci .prose--wide-media > .wp-caption img, .ci .prose--wide-media > .wp-block-image img { border-radius: var(--ci-block); }
}

/* Article links: navy text on a lime (--ci-third) highlight. Lime text alone is unreadable on white. */
.ci .prose a:not(.btn) { color: var(--ci-navy); text-decoration: none; font-weight: 500; padding: 0 2px; margin: 0 -2px; border-radius: 3px; background: linear-gradient(var(--ci-third), var(--ci-third)) no-repeat left bottom / 100% 19%; box-decoration-break: clone; -webkit-box-decoration-break: clone; transition: background-size .22s cubic-bezier(.2, .8, .2, 1); }
.ci .prose a:not(.btn):hover, .ci .prose a:not(.btn):focus-visible { background-size: 100% 100%; }

/* Share buttons (posts and tools): small monochrome circles */
.ci .share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 28px 0 0; }
.ci .share-label { margin-right: 6px; font-size: .85rem; font-weight: 600; color: var(--ci-muted); }
.ci .share-btn { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--ci-navy); box-shadow: inset 0 0 0 1.5px var(--ci-border); transition: background .15s, color .15s, box-shadow .15s; }
.ci .share-btn svg { width: 14px; height: 14px; fill: currentColor; }
.ci .share-btn:hover, .ci .share-btn:focus-visible { background: var(--ci-navy); color: #fff; box-shadow: none; }
.ci .prose + .share, .ci .post-share { max-width: 680px; margin-left: auto; margin-right: auto; }
.ci .tool-layout + .container > .share { margin-top: 24px; }

/* Tool page header: the pill breadcrumb and meta row from the post header, left-aligned */
.ci .pg-head--left .crumbs { margin-bottom: 24px; }
.ci .pg-head--left .post-meta-row { margin-top: 24px; }
.ci .pg-head--left .post-meta-row .tag { margin-bottom: 0; }
.ci .pg-head--left .sec-lede { margin-bottom: 0; }

/* Home poll, step 1 (vote) and step 2 (email prompt) */
.ci .poll-actions { display: flex; justify-content: center; }
.ci .poll-step2 { max-width: 560px; margin: 0 auto; padding: clamp(24px, 4vw, 40px); border-radius: var(--ci-block-sm); background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.14); }
.ci .poll-step2 .poll-voted { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 6px 14px; border-radius: 999px; background: var(--ci-third); color: var(--ci-navy); font-size: .85rem; font-weight: 600; }
.ci .poll-step2 .poll-voted::before { content: '\2713'; }
.ci .poll-step2 h3 { margin: 0 0 8px; font-size: clamp(1.4rem, 2.4vw, 1.8rem); color: #fff; }
.ci .poll-step2 .poll-step2-text { margin: 0 0 20px; color: var(--ci-on-navy); }
.ci .poll-step2 .inline-form .field { flex: 1 1 220px; }
.ci .poll-skip { margin: 16px 0 0; font-size: .9rem; }
.ci .poll-skip a { color: var(--ci-on-navy); text-decoration: underline; text-underline-offset: 4px; }
.ci .poll-skip a:hover { color: #fff; }
.ci .poll-done { text-align: center; font-size: 1.15rem; }
.ci .section--dark .poll-step2 .form-status { color: var(--ci-third); }

/* Booking dialog: the Cal.com embed in a modal, so "Book a free call" keeps visitors on the site */
.ci-book { width: min(960px, calc(100vw - 32px)); max-width: none; height: min(780px, calc(100vh - 32px)); max-height: none; padding: 0; border: 0; border-radius: var(--ci-radius-md); background: #fff; box-shadow: 0 40px 80px -30px rgba(var(--ci-navy-rgb), .5); overflow: hidden; }
.ci-book::backdrop { background: rgba(15, 28, 46, .62); }
.ci-book[open] { animation: ci-book-in .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes ci-book-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
.ci-book-panel { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; }
.ci-book iframe { flex: 1 1 auto; width: 100%; height: 100%; border: 0; display: block; }
.ci-book-close { position: absolute; top: 10px; right: 10px; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--ci-bg-soft); color: var(--ci-navy); cursor: pointer; box-shadow: 0 0 0 1.5px var(--ci-border); transition: background .15s, color .15s; }
.ci-book-close svg { width: 18px; height: 18px; }
.ci-book-close:hover, .ci-book-close:focus-visible { background: var(--ci-navy); color: #fff; box-shadow: none; }
.ci-book-loading { position: absolute; inset: 0 0 41px; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: #fff; color: var(--ci-muted); font: 500 .95rem var(--ci-font-body); pointer-events: none; }
.ci-book-loading[hidden] { display: none; }
.ci-book-spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--ci-border); border-top-color: var(--ci-navy); animation: ci-spin .8s linear infinite; }
@keyframes ci-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ci-book-spinner { animation-duration: 2s; } }
.ci-book-fallback { flex: none; margin: 0; padding: 10px 16px; font-size: .85rem; text-align: center; color: var(--ci-muted); border-top: 1px solid var(--ci-border); }
.ci-book-fallback a { color: var(--ci-navy); }
@media (prefers-reduced-motion: reduce) { .ci-book[open] { animation: none; } }
@media print { .ci-book { display: none !important; } }

/* Contact Form 7 inside .form-card: map its wrappers onto the existing field styles */
.ci .wpcf7-form-control-wrap { display: block; }
.ci .wpcf7-not-valid-tip { display: block; margin-top: 6px; font-size: .85rem; color: var(--ci-orange-dark); }
.ci .wpcf7-form .wpcf7-response-output { margin: 14px 0 0; padding: 0; border: 0; font-weight: 500; color: var(--ci-navy); }
.ci .wpcf7-form.invalid .wpcf7-response-output, .ci .wpcf7-form.failed .wpcf7-response-output, .ci .wpcf7-form.spam .wpcf7-response-output, .ci .wpcf7-form.unaccepted .wpcf7-response-output { color: var(--ci-orange-dark); }
.ci .wpcf7-spinner { margin-left: 12px; }
.ci input.btn, .ci button.btn { font-family: var(--ci-font-body); -webkit-appearance: none; appearance: none; }
.ci .wpcf7-form p { margin: 0; }
.ci .wpcf7-form .field { margin-bottom: 20px; }

/* Featured tool embedded on Home: the tool's own result box, sized like the approved card */
.ci .try-win .form-card { padding: 0; background: none; border-radius: 0; }
.ci .try-win .result-box { margin-top: 14px; padding: 16px 18px; border-radius: 14px; }
.ci .try-win .result-box .stat { font-size: 2rem; letter-spacing: -0.03em; margin: 0; color: var(--ci-third); }
.ci .try-win .result-box .result-label { font-size: .85rem; }
.ci .try-win .result-box .result-sub { font-size: .85rem; margin-top: 4px; }
.ci .try-win .try-spots { margin-top: 18px; }

/* Tool pages: result text defaults on the navy box */
.ci .result-box .stat { color: #fff; }

/* Blog toolbar: category chips on the left, search on the right, directly above the grid */
.ci .blog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin: 0 0 clamp(28px, 4vw, 48px); }
.ci .blog-toolbar .chips { margin: 0; flex: 1 1 auto; }
.ci .blog-toolbar .pg-search { flex: 0 1 320px; margin: 0; }
.ci .blog-toolbar .pg-search input { padding: 12px 20px; }
@media (max-width: 700px) { .ci .blog-toolbar .pg-search { flex-basis: 100%; } }

/* Pagination (only when a listing has more posts than the client-side filter handles) */
.ci .ci-pagination { margin-top: 32px; text-align: center; }
.ci .ci-pagination .nav-links { display: inline-flex; gap: 12px; }
.ci .ci-pagination a { font-weight: 600; color: var(--ci-navy); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.ci .ci-pagination a:hover { color: var(--ci-muted); }

/* Search results and 404 */
.ci .pg-head .pg-search { margin-left: auto; margin-right: auto; }
.ci .results-title { font-size: clamp(1.4rem, 2.4vw, 2rem); margin: 0 0 24px; }
.ci .not-found-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }

/* Post card thumbnails rendered by WordPress keep the card's crop */
.ci .post-card img.thumb { height: auto; }

/* Print: no admin bar offset */
@media print {
  body { padding-top: 0 !important; }
  #wpadminbar, .skip-link { display: none !important; }
}
