/*
 * Nuslagen — base layer on top of theme.json.
 * 1. Aliases the Broadsheet token names (--color-*, --font-*, --space-*, --radius-*, --shadow-*)
 *    to the theme.json presets, so markup written against the design system just works.
 * 2. Block styles registered in functions.php.
 * 3. Global interaction states.
 */
:root {
	--color-bg: var(--wp--preset--color--bg);
	--color-surface: var(--wp--preset--color--surface);
	--color-text: var(--wp--preset--color--text);
	--color-accent: var(--wp--preset--color--accent);
	--color-accent-2: var(--wp--preset--color--accent-2);
	--color-divider: color-mix(in srgb, var(--wp--preset--color--text) 16%, transparent);
	--color-process-yellow: var(--wp--preset--color--process-yellow);
	--color-neutral-100: var(--wp--preset--color--neutral-100); --color-neutral-200: var(--wp--preset--color--neutral-200); --color-neutral-300: var(--wp--preset--color--neutral-300);
	--color-neutral-400: var(--wp--preset--color--neutral-400); --color-neutral-500: var(--wp--preset--color--neutral-500); --color-neutral-600: var(--wp--preset--color--neutral-600);
	--color-neutral-700: var(--wp--preset--color--neutral-700); --color-neutral-800: var(--wp--preset--color--neutral-800); --color-neutral-900: var(--wp--preset--color--neutral-900);
	--color-accent-100: var(--wp--preset--color--accent-100); --color-accent-200: var(--wp--preset--color--accent-200); --color-accent-300: var(--wp--preset--color--accent-300);
	--color-accent-400: var(--wp--preset--color--accent-400); --color-accent-500: var(--wp--preset--color--accent-500); --color-accent-600: var(--wp--preset--color--accent-600);
	--color-accent-700: var(--wp--preset--color--accent-700); --color-accent-800: var(--wp--preset--color--accent-800); --color-accent-900: var(--wp--preset--color--accent-900);
	--color-accent-2-100: var(--wp--preset--color--accent-2-100); --color-accent-2-200: var(--wp--preset--color--accent-2-200); --color-accent-2-300: var(--wp--preset--color--accent-2-300);
	--color-accent-2-400: var(--wp--preset--color--accent-2-400); --color-accent-2-500: var(--wp--preset--color--accent-2-500); --color-accent-2-600: var(--wp--preset--color--accent-2-600);
	--color-accent-2-700: var(--wp--preset--color--accent-2-700); --color-accent-2-800: var(--wp--preset--color--accent-2-800); --color-accent-2-900: var(--wp--preset--color--accent-2-900);
	--font-heading: var(--wp--preset--font-family--serif);
	--font-heading-weight: 600;
	--font-body: var(--wp--preset--font-family--serif);
	--space-1: var(--wp--preset--spacing--10); --space-2: var(--wp--preset--spacing--20); --space-3: var(--wp--preset--spacing--30);
	--space-4: var(--wp--preset--spacing--40); --space-6: var(--wp--preset--spacing--50); --space-8: var(--wp--preset--spacing--60);
	--radius-sm: var(--wp--custom--radius--sm); --radius-md: var(--wp--custom--radius--md); --radius-lg: var(--wp--custom--radius--lg);
	--shadow-sm: var(--wp--preset--shadow--sm); --shadow-md: var(--wp--preset--shadow--md); --shadow-lg: var(--wp--preset--shadow--lg);
	--gutter: var(--wp--custom--gutter);
	interpolate-size: allow-keywords;
}

html { scroll-behavior: smooth; }
/* The header part is a floating pill, so <main> must start at the very top (core adds blockGap between root blocks). */
body .wp-site-blocks > main { margin-block-start: 0; }
body { text-wrap: pretty; -webkit-font-smoothing: antialiased; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } }

::selection { background: color-mix(in srgb, var(--color-accent) 22%, transparent); }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
:where(h1, h2, h3, h4) { text-wrap: balance; }
em, i { font-style: italic; }

/* Kicker: small caps label above headings */
.is-style-kicker, .ns-kicker { font-size: var(--wp--preset--font-size--x-small); line-height: 1.1; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-neutral-700); margin-bottom: 14px; }
.is-style-kicker + h1, .is-style-kicker + h2, .is-style-kicker + h3 { margin-top: 0; }
.is-style-lead { font-size: var(--wp--preset--font-size--large); max-width: var(--wp--custom--measure--body); color: var(--color-neutral-800); }
.ns-measure { max-width: var(--wp--custom--measure--body); }
.ns-justify { text-align: justify; hyphens: auto; }

/* Check-mark list (hero USPs) */
.is-style-checks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 18px; font-family: var(--font-heading); font-weight: 600; font-size: clamp(1.125rem, 1.9vw, 1.625rem); line-height: 1.25; letter-spacing: -0.01em; }
.is-style-checks li { display: flex; gap: 16px; align-items: center; }
.is-style-checks li::before { content: ""; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--color-accent) center / 12px 6px no-repeat; box-shadow: 0 0 0 5px color-mix(in srgb, var(--color-accent) 22%, transparent); background-image: linear-gradient(currentColor, currentColor), linear-gradient(currentColor, currentColor); background-size: 0; }
.is-style-checks li::after { content: none; }
.is-style-checks li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 10'%3E%3Cpath d='M1 5l4 4 8-8' fill='none' stroke='%23f3f2f2' stroke-width='2'/%3E%3C/svg%3E"); background-size: 14px 10px; }

/* Card group */
.is-style-card { background: var(--color-bg); border-radius: var(--radius-lg); padding: var(--space-4); box-shadow: var(--shadow-md); }

/* Ghost button */
.wp-block-button.is-style-ghost .wp-block-button__link { background: transparent; color: var(--color-accent-700); border-color: transparent; padding-left: 0.4em; padding-right: 0.4em; }
.wp-block-button.is-style-ghost .wp-block-button__link:hover { color: var(--color-accent-600); background: color-mix(in srgb, var(--color-accent) 8%, transparent); }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: color-mix(in srgb, var(--color-text) 6%, transparent); }

/* Thick-thin rule (front-page furniture) */
/* Rules run edge to edge (core forces 100px on non-wide separators with a (0,3,0) selector). */
.wp-block-separator:not(.is-style-wide):not(.is-style-dots) { width: 100%; max-width: none; margin-left: 0; margin-right: 0; }
.wp-block-separator.is-style-thick-thin:not(.is-style-dots) { height: 5px; border: 0; border-top: 2px solid var(--color-text); border-bottom: 1px solid var(--color-text); background: none; }
.wp-block-separator:not(.is-style-thick-thin):not(.is-style-dots) { height: 0; border: 0; border-top: 1px solid var(--color-text); background: none; }

/* Details / FAQ */
.wp-block-details summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; align-items: baseline; padding: 18px 0; font-family: var(--font-heading); font-weight: 600; font-size: var(--wp--preset--font-size--x-large); line-height: 1.4; }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; color: var(--color-accent-700); font-weight: 400; font-size: 1.3em; line-height: 1; transition: transform 0.3s ease; }
.wp-block-details[open] summary::after { content: "−"; }
.wp-block-details > :not(summary) { max-width: var(--wp--custom--measure--body); color: var(--color-neutral-800); margin: 0 0 22px; }
.wp-block-details::details-content { block-size: 0; overflow: hidden; opacity: 0; transition: block-size 0.35s ease, opacity 0.3s ease, content-visibility 0.35s allow-discrete; }
.wp-block-details[open]::details-content { block-size: auto; opacity: 1; }

/* Forms (core search etc.) */
.wp-block-search__input { border: 1px solid var(--color-divider); background: var(--color-surface); border-radius: var(--radius-md); font: inherit; padding: 0.6em 0.75em; }

/* Accordion (core block) in the Broadsheet voice: rules, serif question, +/− in accent,
   and a real open/close animation (core only declares a transition without making the item a grid). */
.wp-block-accordion { border-top: 2px solid var(--color-text); }
.wp-block-accordion-item { display: grid; grid-template-rows: auto 0fr; border-bottom: 1px solid var(--color-text); margin-block: 0 !important; transition: grid-template-rows 0.35s ease; }
.wp-block-accordion-item.is-open { grid-template-rows: auto 1fr; }
.wp-block-accordion-heading { margin: 0; font-size: var(--wp--preset--font-size--x-large); line-height: 1.4; letter-spacing: -0.01em; }
.wp-block-accordion-heading__toggle { display: flex; width: 100%; justify-content: space-between; align-items: baseline; gap: 20px; padding: 18px 0 !important; background: none; border: 0; color: inherit; font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.wp-block-accordion-heading__toggle:hover .wp-block-accordion-heading__toggle-title { text-decoration: underline; text-decoration-color: var(--color-accent); text-underline-offset: 0.2em; }
.wp-block-accordion-heading__toggle-icon { color: var(--color-accent-700); font-weight: 400; font-size: 0; line-height: 1; width: auto; height: auto; }
.wp-block-accordion-heading__toggle-icon::before { content: "+"; font-size: 1.625rem; font-variant-numeric: tabular-nums; }
.wp-block-accordion-heading__toggle-icon svg { display: none; }
.wp-block-accordion-item.is-open > .wp-block-accordion-heading .wp-block-accordion-heading__toggle-icon { transform: none; }
.wp-block-accordion-item.is-open .wp-block-accordion-heading__toggle-icon::before { content: "−"; }
/* The panel stays in the layout while hidden so its row can collapse/expand smoothly. */
.wp-block-accordion-panel { min-height: 0; overflow: hidden; padding: 0 !important; opacity: 0; transition: opacity 0.3s ease; }
.wp-block-accordion-panel[hidden] { display: block; content-visibility: visible; }
.wp-block-accordion-item.is-open .wp-block-accordion-panel { opacity: 1; }
.wp-block-accordion-panel > * { max-width: var(--wp--custom--measure--body); color: var(--color-neutral-800); }
.wp-block-accordion-panel > :first-child { margin-top: 0; }
.wp-block-accordion-panel > :last-child { margin-bottom: 22px; }
@media (prefers-reduced-motion: reduce) { .wp-block-accordion-item, .wp-block-accordion-panel { transition: none; } }
