/* ==========================================================================
   Presense — WordPress-only selectors. Everything the prototype did not need:
   Elementor wrappers, Formidable forms, Rank Math, admin bar. Loaded after ps.min.css.
   ========================================================================== */

/* Elementor containers/widgets carry ps-* classes; neutralise the wrapper defaults so the prototype CSS rules the layout. */
.ps-site .e-con.ps-section, .ps-site .e-con.ps-wrap, .ps-site .e-con.ps-intro, .ps-site .e-con.ps-stack, .ps-site .e-con.ps-page-hero__copy, .ps-site .e-con.ps-page-hero__grid { --padding-block-start: 0; --padding-block-end: 0; --padding-inline-start: 0; --padding-inline-end: 0; --gap: 0; --row-gap: 0; --column-gap: 0; --align-items: initial; --justify-content: initial; --flex-wrap: initial; }
.ps-site .e-con.ps-section { --width: 100%; width: 100%; max-width: none; padding-block: var(--section-y); }
.ps-site .e-con.ps-section--tight { padding-block: calc(var(--section-y) * .5); }
.ps-site .e-con.ps-page-hero { padding-top: calc(var(--header-h) + var(--s-8)); padding-bottom: var(--s-12); }
@media (min-width: 1024px) { .ps-site .e-con.ps-page-hero { padding-top: calc(var(--header-h) + var(--s-12)); padding-bottom: var(--s-16); } }
.ps-site .e-con.ps-wrap { width: var(--container); max-width: none; margin-inline: auto; }
.ps-site .e-con.ps-wrap--narrow { width: var(--container-narrow); }
.ps-site .e-con > .e-con-inner { padding: 0; }
.ps-site .e-con.ps-intro { display: grid; gap: var(--s-4); max-width: 46rem; }
.ps-site .e-con.ps-stack { display: block; }
.ps-site .e-con.ps-stack > * + * { margin-top: var(--s-6); }
.ps-site .e-con.ps-page-hero__copy { display: grid; gap: var(--s-4); justify-items: start; }
.ps-site .e-con.ps-page-hero__grid { display: grid; gap: var(--s-8); align-items: center; }
@media (min-width: 1024px) { .ps-site .e-con.ps-page-hero__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-16); } .ps-site .e-con.ps-page-hero__grid--single { grid-template-columns: minmax(0, 9fr) minmax(0, 3fr); } }
/* grid page wrappers built as containers */
.ps-site .e-con.ps-services, .ps-site .e-con.ps-how, .ps-site .e-con.ps-cases, .ps-site .e-con.ps-check-section, .ps-site .e-con.ps-about-teaser, .ps-site .e-con.ps-insight, .ps-site .e-con.ps-faq-section, .ps-site .e-con.ps-cta-band, .ps-site .e-con.ps-contact, .ps-site .e-con.ps-article, .ps-site .e-con.ps-404__grid { display: grid; }
.ps-site .e-con.ps-services__head { display: grid; }
/* widgets: no default margins, inherit text */
.ps-site .elementor-widget.ps-w { margin-block-end: 0; }
.ps-site .elementor-widget.ps-w > .elementor-widget-container { margin: 0; }
.ps-site .elementor-widget-heading.ps-w .elementor-heading-title { font: inherit; color: inherit; line-height: inherit; letter-spacing: inherit; margin: 0; }
.ps-site .elementor-widget-heading.ps-h1 .elementor-heading-title { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-h1); line-height: var(--lh-heading); letter-spacing: -.01em; max-width: 18ch; text-wrap: balance; }
.ps-site .elementor-widget-heading.ps-h2 .elementor-heading-title { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-h2); line-height: var(--lh-heading); letter-spacing: -.01em; max-width: 22ch; text-wrap: balance; }
.ps-site .elementor-widget-heading.ps-h3 .elementor-heading-title { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-h3); line-height: 1.12; }
.ps-site .elementor-widget-heading.ps-cta-band__title .elementor-heading-title { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-display); line-height: var(--lh-display); font-style: italic; max-width: 16ch; }
.ps-site .elementor-widget-heading.ps-cta-band__title .elementor-heading-title em { font-style: normal; }
.ps-site .elementor-widget-heading .elementor-heading-title em, .ps-site .elementor-widget-text-editor h2 em { font-style: italic; color: var(--accent-display); }
.ps-site .elementor-widget-text-editor.ps-w { font: inherit; color: inherit; }
.ps-site .elementor-widget-text-editor.ps-w p { margin: 0; }
.ps-site .elementor-widget-text-editor.ps-w .ps-eyebrow { display: inline-flex; }
.ps-site .elementor-widget-shortcode.ps-w, .ps-site .elementor-widget-html.ps-w { width: 100%; }
.ps-site .elementor-widget.ps-w.ps-page-hero__aside { display: grid; }
/* Elementor's global reset would otherwise style our anchors/lists */
.ps-site .elementor-widget-text-editor.ps-w ul { list-style: none; padding: 0; margin: 0; }
.ps-site .elementor-widget-text-editor.ps-w a:not(.ps-btn) { color: inherit; }
.ps-site .ps-prose a, .ps-site a.ps-link, .ps-site .elementor-widget-text-editor a.ps-link, .ps-site .elementor-widget-text-editor .ps-cta-band__phone a { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 2px; }
.ps-site .ps-main { display: block; }
/* Hello Elementor wraps content in main#content; keep the fixed header out of the flow */
.ps-site #content > .elementor { display: block; }
.ps-site .site-header, .ps-site .site-footer { display: none; }
/* admin bar */
body.admin-bar .ps-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .ps-header { top: 46px; } }
body.admin-bar .ps-mega { top: calc(var(--header-h) + 32px); }

/* Formidable Forms → prototype form look (BRIEF §14.2.11: styled via theme CSS + tokens) ---------------------------------- */
.ps-site .frm_forms { width: 100%; }
.ps-site .frm_forms form { display: grid; gap: var(--s-4); }
.ps-site .frm_forms .frm_form_fields > fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.ps-site .frm_forms .frm_fields_container { display: grid; gap: var(--s-4); }
.ps-site .frm_forms .frm_form_field { margin: 0; display: grid; gap: 6px; }
.ps-site .frm_forms .frm_primary_label { font-size: var(--fs-small); color: var(--fg-muted); font-weight: 500; }
.ps-site .frm_forms .frm_required { color: var(--ps-orange-700); }
.ps-site .frm_forms input[type="text"], .ps-site .frm_forms input[type="email"], .ps-site .frm_forms input[type="tel"], .ps-site .frm_forms input[type="url"], .ps-site .frm_forms input[type="number"], .ps-site .frm_forms textarea, .ps-site .frm_forms select {
  width: 100%; min-height: 56px; padding: 14px 16px; font: inherit; font-size: 1rem; line-height: 1.3; color: var(--fg); background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: none; transition: border-color var(--t-micro), box-shadow var(--t-micro);
}
.ps-site .frm_forms textarea { min-height: 132px; resize: vertical; }
.ps-site .frm_forms select { appearance: none; padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234E6478' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; }
.ps-site .frm_forms input:focus, .ps-site .frm_forms textarea:focus, .ps-site .frm_forms select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgb(246 118 47 / .3); }
.ps-site .frm_forms .frm_half { width: 100%; }
@media (min-width: 640px) { .ps-site .frm_forms .frm_fields_container { grid-template-columns: 1fr 1fr; } .ps-site .frm_forms .frm_form_field, .ps-site .frm_forms .frm_submit, .ps-site .frm_forms .frm_page_num, .ps-site .frm_forms .frm_rootline_group { grid-column: 1 / -1; } .ps-site .frm_forms .frm_form_field.frm_half { grid-column: auto; } }
/* checkbox / consent */
.ps-site .frm_forms .frm_checkbox { font-size: var(--fs-small); color: var(--fg-muted); }
.ps-site .frm_forms .frm_checkbox label { display: block; position: relative; padding-left: 34px; line-height: 1.5; color: var(--fg-muted); font-size: var(--fs-small); font-weight: 400; cursor: pointer; }
.ps-site .frm_forms .frm_checkbox input[type="checkbox"] { position: absolute; left: 0; top: 1px; width: 22px; height: 22px; min-height: 0; padding: 0; margin: 0; accent-color: var(--ps-orange-500); border-radius: 4px; }
.ps-site .frm_forms .frm_checkbox a { text-decoration: underline; text-underline-offset: .18em; color: var(--fg); }
/* chips (checkbox field with the class ps-chips-field: services in step 1) */
.ps-site .frm_forms .ps-chips-field .frm_opt_container { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.ps-site .frm_forms .ps-chips-field .frm_checkbox { display: block; }
.ps-site .frm_forms .ps-chips-field .frm_checkbox input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ps-site .frm_forms .ps-chips-field .frm_checkbox label { display: inline-flex; align-items: center; min-height: 48px; padding: 0 16px; position: static; border-radius: var(--r-pill); border: 1px solid var(--line); font-size: var(--fs-small); font-weight: 500; color: var(--fg); cursor: pointer; transition: background var(--t-micro), border-color var(--t-micro), color var(--t-micro); }
.ps-site .frm_forms .ps-chips-field .frm_checkbox label:hover { border-color: var(--fg); }
.ps-site .frm_forms .ps-chips-field .frm_checkbox input:checked + label, .ps-site .frm_forms .ps-chips-field .frm_checkbox label:has(input:checked) { background: var(--ps-orange-500); border-color: var(--ps-orange-500); color: var(--ps-text-900); }
.ps-site .frm_forms .ps-chips-field .frm_checkbox input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 3px; }
/* buttons */
.ps-site .frm_forms .frm_submit { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); flex-wrap: wrap; }
.ps-site .frm_forms .frm_button_submit, .ps-site .frm_forms .frm_final_submit, .ps-site .frm_forms .frm_page_bar .frm_next_page { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: var(--r-pill); border: 1px solid transparent; font: inherit; font-weight: 500; font-size: 1rem; line-height: 1; background: var(--ps-orange-500); color: var(--ps-text-900); cursor: pointer; transition: background var(--t-micro); margin-left: auto; }
.ps-site .frm_forms .frm_button_submit:hover, .ps-site .frm_forms .frm_final_submit:hover { background: var(--ps-orange-600); }
.ps-site .frm_forms .frm_prev_page { background: none; border: 0; padding: 0; font: inherit; font-weight: 500; color: var(--fg); cursor: pointer; position: relative; margin-right: auto; }
.ps-site .frm_forms .frm_prev_page::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--ps-orange-500); transform: scaleX(.35); transform-origin: left; transition: transform 250ms var(--ease-out); }
.ps-site .frm_forms .frm_prev_page:hover::after { transform: scaleX(1); }
.ps-site .ps-surface--dark .frm_forms .frm_button_submit { width: 100%; }
/* errors + messages */
/* Field errors sit outside the flow: Formidable removes the line on blur, which would move the «Neste»/«Send» button
   up under the pointer between pointerdown and click (the click is lost). Text fields get an absolutely positioned
   one-liner inside the 16 px row gap; checkbox / chip fields keep the in-flow line (their error clears on change, not blur). */
.ps-site .frm_forms .frm_form_field { position: relative; }
.ps-site .frm_forms .frm_error { font-size: var(--fs-small); color: var(--ps-error); }
.ps-site .frm_forms .frm_form_field:not(:has(input[type="checkbox"])):not(:has(input[type="radio"])) > .frm_error { position: absolute; left: 0; top: calc(100% + 2px); margin: 0; max-width: 100%; font-size: 0.75rem; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-site .frm_forms .frm_blank_field input, .ps-site .frm_forms .frm_blank_field textarea { border-color: var(--ps-error); }
.ps-site .frm_forms .frm_error_style, .ps-site .frm_forms .frm_message { padding: var(--s-3) var(--s-4); border-radius: var(--r-md); border: 1px solid var(--line); font-size: var(--fs-small); }
.ps-site .frm_forms .frm_description { font-size: var(--fs-small); color: var(--fg-muted); }
/* rootline (multi-step progress: ul.frm_page_bar > li > input[type=button]) → 2 px bar + mono «Steg 1 / 3» (text via gettext filter) */
.ps-site .frm_forms .frm_rootline_group { display: grid; gap: var(--s-2); outline: none; }
.ps-site .frm_forms .frm_page_bar { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; height: auto; background: none; }
.ps-site .frm_forms .frm_page_bar li { flex: 1; margin: 0; padding: 0; background: none; border: 0; }
.ps-site .frm_forms .frm_page_bar li::before, .ps-site .frm_forms .frm_page_bar li::after { display: none; }
.ps-site .frm_forms .frm_page_bar input[type="button"] { width: 100%; height: 2px; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 2px; background: var(--line); color: transparent; font-size: 0; cursor: default; box-shadow: none; }
.ps-site .frm_forms .frm_page_bar .frm_current_page input, .ps-site .frm_forms .frm_page_bar .frm_page_completed input, .ps-site .frm_forms .frm_page_bar li:has(~ .frm_current_page) input { background: var(--ps-orange-500); }
.ps-site .frm_forms .frm_rootline_titles, .ps-site .frm_forms .frm_percent_complete { display: none !important; }
.ps-site .frm_forms .frm_pages_complete, .ps-site .frm_forms .frm_page_num_text { font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-muted); text-align: left; margin: 0; }
.ps-site .frm_forms .frm_html_container h3 { color: var(--fg); margin-top: var(--s-2); }
.ps-site .frm_forms .frm_hidden, .ps-site .frm_forms .frm_verify { display: none !important; }
/* «label: none» fields keep their control; only the label is hidden. Honeypot fields ship their own inline hiding. */
.ps-site .frm_forms .frm_none_container > .frm_primary_label, .ps-site .frm_forms .frm_screen_reader { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
/* note under forms */
.ps-site .frm_forms .frm_after_html p, .ps-site .frm_forms .ps-form__note { font-size: var(--fs-small); color: var(--fg-muted); display: flex; gap: 8px; align-items: center; }
.ps-site .frm_forms .frm_after_html p::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ps-success); flex: none; }
/* article body from the editor */
.ps-site .ps-prose > .wp-block-image img, .ps-site .ps-prose figure { border-radius: var(--r-md); }

/* ---- Phase 4 polish: keep the prototype's prose rhythm inside Elementor text widgets (the .ps-w reset zeroes p margins) */
.ps-site .elementor-widget-text-editor.ps-w .ps-prose > * + * { margin-top: 1em; }
.ps-site .elementor-widget-text-editor.ps-w .ps-prose h2 { margin-top: var(--s-8); }
.ps-site .elementor-widget-text-editor.ps-w .ps-prose h3 { margin-top: var(--s-6); }

/* ---- Polish: service-hero CTA block air (the .ps-w reset zeroes p margins inside shortcode widgets) */
.ps-site .ps-w .ps-page-hero__ctas { margin-top: var(--s-4); }
.ps-site .elementor-widget-shortcode.ps-w .elementor-shortcode > p.ps-page-hero__who { margin-top: calc(var(--s-4) + var(--s-1)); }
.ps-site .elementor-widget-shortcode.ps-w .elementor-shortcode > .ps-page-hero__who + .ps-btn--text { margin-top: var(--s-2); display: inline-flex; }
@media (min-width: 1024px) { .ps-site .ps-w .ps-page-hero__ctas { margin-top: calc(var(--s-4) + var(--s-1)); } .ps-site .elementor-widget-shortcode.ps-w .elementor-shortcode > p.ps-page-hero__who { margin-top: var(--s-6); } }

/* ---- Case aside: facts + button share one shortcode wrapper, so the aside grid gap never separates them */
.ps-site .elementor-shortcode > .ps-case__facts + .ps-btn { margin-top: var(--s-8); }
