/* ip-labs · site tweaks on top of the shared design system (theme.css).
   Colors come from the palette tokens only. Mono = labels and metrics, Sans = everything else. */

:root { --ipl-mono: var(--wp--preset--font-family--mono); --ipl-dim: color-mix(in srgb, var(--wp--preset--color--text-inverse) 62%, transparent); }

/* Page background and cards (cards are white on the light page) */
.is-style-card { background: #fff; }
.is-style-tone-dark .is-style-card { background: var(--wp--preset--color--dark-alt); }
.is-style-tone-muted .is-style-card { background: var(--wp--preset--color--light); }
.is-style-card { border-radius: var(--wp--custom--radius--card); }

/* Links inside page content: black text with a lime underline (lime text is not readable on light) */
main a:not(.wp-element-button):not(.wp-block-post-title a):not(.wp-block-post-excerpt__more-link):not(.wp-block-navigation-item__content) {
	text-decoration: underline; text-decoration-color: var(--wp--preset--color--accent); text-decoration-thickness: 2px; text-underline-offset: 3px;
}
main a:not(.wp-element-button):hover { color: var(--wp--preset--color--text-muted); }
main .is-style-tone-dark a:not(.wp-element-button):hover { color: var(--wp--preset--color--text-inverse); }

/* Eyebrow = mono label, no rule, never lime on light */
.is-style-eyebrow { font-family: var(--ipl-mono); font-weight: 500; letter-spacing: 0.08em; color: var(--wp--preset--color--text-muted); }
.is-style-eyebrow::before { display: none; }
.is-style-tone-dark .is-style-eyebrow { color: var(--ipl-dim); }
.ipl-mono { font-family: var(--ipl-mono); font-size: var(--wp--preset--font-size--xs); letter-spacing: 0.04em; color: var(--wp--preset--color--text-muted); margin: 0; }
.is-style-tone-dark .ipl-mono { color: var(--ipl-dim); }

/* Buttons: primary lime, outline secondary */
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: inherit; border: 1px solid color-mix(in srgb, currentColor 45%, transparent); }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: transparent; color: inherit; border-color: currentColor; }
.is-style-tone-dark .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover { background: color-mix(in srgb, var(--wp--preset--color--accent) 82%, #000); color: var(--wp--preset--color--accent-contrast); }
.wp-block-buttons { gap: 0.75rem; }

/* Header: dark bar, lime square before the name, lime CTA */
.kit-header { background: var(--wp--preset--color--dark); color: var(--wp--preset--color--text-inverse); border-bottom: 1px solid #23262A; -webkit-backdrop-filter: none; backdrop-filter: none; }
.kit-header :is(.wp-block-site-title a, .wp-block-navigation a) { color: var(--wp--preset--color--text-inverse); text-decoration: none; }
.kit-header .wp-block-navigation a:hover { color: var(--wp--preset--color--accent); text-decoration: none; }
.kit-header .wp-block-site-title { margin: 0; }
.kit-header .wp-block-site-title a { display: inline-flex; align-items: center; gap: 0.6rem; }
.kit-header .wp-block-site-title a::before { content: ""; width: 12px; height: 12px; background: var(--wp--preset--color--accent); border-radius: 2px; }
.kit-header .wp-block-navigation__responsive-container-open, .kit-header .wp-block-navigation__responsive-container-close { color: var(--wp--preset--color--text-inverse); }
.kit-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--dark); color: var(--wp--preset--color--text-inverse); }
.kit-header .wp-block-navigation__responsive-container.is-menu-open a { font-size: 1.25rem; padding-block: 0.6rem; }

/* Footer */
.kit-footer a { text-decoration: none; }
.kit-footer .wp-block-site-title a::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 0.6rem; background: var(--wp--preset--color--accent); border-radius: 2px; }
.kit-footer .ipl-legal { font-family: var(--ipl-mono); font-size: var(--wp--preset--font-size--xs); color: var(--ipl-dim); }

/* Hero: two columns, answer card on the right */
.ipl-hero .wp-block-columns { align-items: center; gap: clamp(2rem, 5vw, 4.5rem); }
.ipl-hero h1 { text-wrap: balance; }
.ipl-lead { font-size: 1.1875rem; line-height: 1.6; color: var(--ipl-dim); max-width: 36rem; text-wrap: pretty; }
.ipl-check-row { margin: 0; padding-top: 1.25rem; border-top: 1px solid #23262A; font-family: var(--ipl-mono); font-size: 0.8125rem; color: var(--ipl-dim); }
.ipl-check-row strong { color: var(--wp--preset--color--text-inverse); font-weight: 500; margin-right: 0.5rem; }

/* AI answer card (the signature element). Modifier is-good / is-bad sets the status dot. */
.ipl-answer { background: var(--wp--preset--color--dark-alt); border: 1px solid #2A2E33; border-radius: 16px; overflow: hidden; color: var(--wp--preset--color--text-inverse); box-shadow: var(--wp--preset--shadow--soft); display: flex; flex-direction: column; height: 100%; }
.ipl-answer > * { margin: 0; }
.ipl-answer__head { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.75rem 1.125rem; border-bottom: 1px solid #2A2E33; font-family: var(--ipl-mono); font-size: 0.75rem; color: #9AA0A6; }
.ipl-answer__who { color: var(--wp--preset--color--text-inverse); display: flex; align-items: center; gap: 0.5rem; margin: 0; }
.ipl-answer__who::before { content: ""; width: 8px; height: 8px; background: var(--wp--preset--color--accent); border-radius: 2px; }
.ipl-answer__meta { margin: 0; }
.ipl-answer__body { display: flex; flex-direction: column; gap: 1rem; padding: 1.25rem 1.125rem 1.125rem; flex: 1; }
.ipl-answer__body > * { margin: 0; }
.ipl-answer__q { align-self: flex-end; max-width: 88%; background: #23262A; border-radius: 14px 14px 4px 14px; padding: 0.625rem 0.875rem; font-size: 0.9375rem; line-height: 1.45; }
.ipl-answer__label { font-family: var(--ipl-mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: #9AA0A6; }
.ipl-answer__text { font-size: 1rem; line-height: 1.55; color: #DADDE0; }
.ipl-answer__sources { list-style: none; display: flex; flex-wrap: wrap; gap: 0.375rem; padding: 0; counter-reset: src; }
.ipl-answer__sources li { counter-increment: src; display: inline-flex; align-items: center; gap: 0.375rem; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 1px solid #34383D; border-radius: 999px; padding: 0.1875rem 0.625rem 0.1875rem 0.1875rem; font-family: var(--ipl-mono); font-size: 0.75rem; color: #C9CDD1; margin: 0; }
.ipl-answer__sources li::before { content: counter(src); display: inline-grid; place-items: center; flex: none; width: 18px; height: 18px; border-radius: 99px; background: #23262A; color: #9AA0A6; font-size: 0.6875rem; }
.ipl-answer__status { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.125rem; border-top: 1px solid #2A2E33; font-family: var(--ipl-mono); font-size: 0.75rem; color: #C9CDD1; }
.ipl-answer__status::before { content: ""; width: 8px; height: 8px; border-radius: 99px; background: #9AA0A6; }
.ipl-answer.is-good .ipl-answer__status::before { background: var(--wp--preset--color--accent); }
.ipl-answer.is-bad .ipl-answer__status::before { background: #FF6B57; }

/* Numbered process steps: a rule on top, mono label */
.ipl-step { border-top: 2px solid var(--wp--preset--color--text); padding-top: 1.25rem; }
.ipl-step .ipl-mono { font-weight: 600; color: var(--wp--preset--color--text); font-size: 0.8125rem; }
.ipl-step h3 { margin-top: 0.5rem; }

/* Cards: mono tag line, footer arrow */
.ipl-card { height: 100%; display: flex; flex-direction: column; gap: 0.75rem; }
.ipl-card > * { margin: 0; }
.ipl-card .wp-block-post-title { font-size: 1.5rem; letter-spacing: -0.015em; }
.ipl-card .wp-block-post-title a { text-decoration: none; }
.ipl-card .wp-block-post-excerpt { flex: 1; }
.ipl-card .ipl-more { padding-top: 0.875rem; border-top: 1px solid #EEF0F1; font-family: var(--ipl-mono); font-size: 0.875rem; font-weight: 600; }
.ipl-card:hover { border-color: var(--wp--preset--color--text); }
.wp-block-post-template.is-layout-grid { gap: 1.5rem; }

/* Service rows on the Services page */
.ipl-service { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 781px) { .ipl-service { grid-template-columns: 1fr; } }
.ipl-service > * { margin: 0; }
.ipl-service .kit-lines { margin: 0; }

/* Results band on case studies */
.kit-lines--stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.5rem; }
.kit-lines--stats .kit-stat { border: 1px solid var(--wp--preset--color--border); border-radius: 8px; padding: 0.75rem; }
.kit-stat .kit-stat__value { font-family: var(--ipl-mono); font-size: 1.125rem; font-weight: 700; color: var(--wp--preset--color--text); }
.kit-stat .kit-stat__label { font-family: var(--ipl-mono); font-size: 0.75rem; color: var(--wp--preset--color--text-muted); opacity: 1; }
.is-style-tone-dark .kit-stat__label { color: var(--ipl-dim); }

/* FAQ plus sign in text color (lime is not readable on light) */
.wp-block-details.is-style-faq summary::after { color: var(--wp--preset--color--text); }
.wp-block-details.is-style-faq > :not(summary) { color: var(--wp--preset--color--text-muted); }

/* Fact sheet for AI assistants: quote block as the preferred description */
.ipl-quote { border-left: 3px solid var(--wp--preset--color--accent); padding-left: 1.25rem; font-size: 1.125rem; }
.ipl-note { font-family: var(--ipl-mono); font-size: 0.8125rem; color: var(--wp--preset--color--text-muted); }

/* Small helpers used by patterns and parts */
.ipl-dim { color: var(--ipl-dim); }
.kit-footer .wp-block-separator { border-color: #23262A; }
.wp-block-post-excerpt__more-link { font-family: var(--ipl-mono); font-size: 0.875rem; font-weight: 600; text-decoration: none; display: inline-block; margin-top: 0.5rem; }
.wp-block-post-excerpt__more-link:hover { text-decoration: underline; }
.ipl-card .wp-block-post-excerpt { display: flex; flex-direction: column; }

/* Header inner row is centered like the page sections */
.ipl-header-inner { max-width: 1240px; margin-inline: auto; padding-inline: clamp(20px, 4vw, 40px); }
.kit-header .wp-block-buttons .wp-block-button__link { padding: 0.6rem 0.9rem; font-size: 0.875rem; }

/* Rhythm: one gap between neighbouring sections of the same tone; slightly tighter sections */
.kit-section { padding-block: clamp(3rem, 7vw, 6rem); }
.kit-section.is-style-tone-light + .kit-section.is-style-tone-light,
.kit-section.is-style-tone-muted + .kit-section.is-style-tone-muted { padding-top: 0; }
.ipl-hero .ipl-answer { height: auto; }
.ipl-card .wp-block-post-featured-image { margin: 0; }
.is-style-card .wp-block-post-featured-image { margin-bottom: 1rem; }
@media (max-width: 781px) { .ipl-header-inner .wp-block-navigation { margin-left: auto; } }
