/*
Theme Name: DywanikEva
Theme URI: https://dywanikeva.pl
Author: SEOHOUSE
Description: Lekki motyw dla DywanikEva.pl — dywaniki EVA na wymiar. Konfigurator auta, strony modeli, próbnik kolorów, poradnik.
Version: 1.2.0
Requires at least: 6.3
Requires PHP: 8.0
Text Domain: dywanikeva
*/

:root {
  --de-white: #FFFFFF;
  --de-soft: #F5F7FA;
  --de-line: #E5E8EC;
  --de-line-strong: #CBD2DA;
  --de-ink: #1F2328;
  --de-muted: #4B5563;
  --de-blue: #1D4ED8;
  --de-blue-dark: #1E40AF;
  --de-blue-tint: #EEF3FF;
  --de-amber: #FFB020;
  --de-star: #F59E0B;
  --de-font-head: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --de-font-body: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --de-radius-s: 10px;
  --de-radius: 14px;
  --de-radius-l: 20px;
  --de-wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--de-white); color: var(--de-ink); font-family: var(--de-font-body); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--de-blue); }
a:hover { color: var(--de-blue-dark); }
:focus-visible { outline: 3px solid var(--de-blue); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--de-font-head); font-weight: 800; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(32px, 4.6vw, 56px); line-height: 1.1; }
h2 { font-size: clamp(26px, 3.2vw, 40px); }
h3 { font-size: 20px; }
p { margin: 0; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip: auto; background: var(--de-white); padding: 10px 14px; }

.de-wrap { max-width: var(--de-wrap); margin: 0 auto; padding: 0 24px; }
.de-section { padding: 80px 0; }
.de-section--soft { background: var(--de-soft); border-top: 1px solid var(--de-line); border-bottom: 1px solid var(--de-line); }
.de-section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 32px; }
.de-section__head p { font-size: 18px; color: var(--de-muted); margin-top: 10px; max-width: 680px; }
.de-lead { font-size: 19px; color: var(--de-muted); max-width: 560px; }
.de-muted { color: var(--de-muted); }

/* Buttons */
.de-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border-radius: 12px; border: 0; background: var(--de-blue); color: #FFFFFF; font-family: var(--de-font-head); font-weight: 800; font-size: 17px; text-decoration: none; cursor: pointer; }
.de-btn:hover { background: var(--de-blue-dark); color: #FFFFFF; }
.de-btn--lg { min-height: 56px; font-size: 18px; padding: 0 28px; }
.de-btn--block { width: 100%; }
.de-btn--ghost { background: var(--de-blue-tint); color: var(--de-blue); }
.de-btn--ghost:hover { background: #DCE6FF; color: var(--de-blue-dark); }
.de-pill { display: inline-block; background: var(--de-blue-tint); color: var(--de-blue); font-weight: 700; font-size: 14px; padding: 6px 12px; border-radius: 999px; }

/* Top bar + header */
.de-topbar { background: var(--de-ink); color: #FFFFFF; font-size: 14px; }
.de-topbar .de-wrap { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 28px; padding-top: 8px; padding-bottom: 8px; }
.de-header { background: var(--de-white); border-bottom: 1px solid var(--de-line); position: sticky; top: 0; z-index: 50; }
.de-header .de-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 14px; padding-bottom: 14px; }
.de-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--de-ink); font-family: var(--de-font-head); font-weight: 800; font-size: 24px; }
.de-logo span { color: var(--de-blue); }
.de-logo:hover { color: var(--de-ink); }
.de-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 26px; }
.de-nav a { color: var(--de-ink); text-decoration: none; font-weight: 700; }
.de-nav a:hover, .de-nav .current-menu-item > a { color: var(--de-blue); }
.de-header__cta { min-height: 44px; font-size: 16px; }
@media (max-width: 860px) {
  .de-nav { order: 3; width: 100%; overflow-x: auto; }
  .de-nav ul { flex-wrap: nowrap; padding-bottom: 4px; }
  .de-nav li { flex: 0 0 auto; }
}

/* Breadcrumbs */
.de-crumbs { font-size: 14px; color: var(--de-muted); padding: 18px 0 0; }
.de-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.de-crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--de-line-strong); }
.de-crumbs a { color: var(--de-muted); }

/* Hero */
.de-hero { padding: 56px 0 48px; }
.de-hero .de-wrap { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.de-hero__text { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.de-hero__visual { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.de-hero__visual svg { width: 100%; max-width: 340px; height: auto; }
.de-page-hero { padding: 40px 0 48px; }
.de-page-hero h1 { margin: 12px 0 14px; }

/* Configurator */
.de-config { width: 100%; background: var(--de-soft); border: 1px solid var(--de-line); border-radius: var(--de-radius-l); padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.de-config--white { background: var(--de-white); }
.de-config__title { font-family: var(--de-font-head); font-weight: 800; font-size: 19px; }
.de-config__fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.de-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; color: var(--de-muted); }
.de-field select, .de-field input { min-height: 50px; padding: 0 12px; border: 1px solid var(--de-line-strong); border-radius: 12px; background: var(--de-white); font: inherit; font-weight: 400; font-size: 16px; color: var(--de-ink); }
.de-field select:disabled { background: var(--de-soft); color: #8A939E; }
.de-config__msg { font-size: 15px; font-weight: 700; color: var(--de-blue); min-height: 1em; }
.de-config__msg[data-state="error"] { color: #B42318; }

/* Trust bar */
.de-trust { background: var(--de-soft); border-top: 1px solid var(--de-line); border-bottom: 1px solid var(--de-line); }
.de-trust .de-wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; padding-top: 26px; padding-bottom: 26px; }
.de-trust__item { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.de-icon-box { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; background: var(--de-white); border: 1px solid var(--de-line); display: flex; align-items: center; justify-content: center; color: var(--de-blue); }
.de-icon-box--lg { width: 52px; height: 52px; border-radius: 14px; background: var(--de-blue-tint); border: 0; }

/* Cards & grids */
.de-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.de-grid--cars { gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.de-feature { border: 1px solid var(--de-line); border-radius: var(--de-radius-l); padding: 26px; display: flex; flex-direction: column; gap: 10px; background: var(--de-white); }
.de-feature p { color: var(--de-muted); }
.de-car { display: flex; flex-direction: column; gap: 12px; padding: 18px; background: var(--de-white); border: 1px solid var(--de-line); border-radius: 18px; text-decoration: none; color: var(--de-ink); }
.de-car:hover { border-color: var(--de-blue); color: var(--de-ink); }
.de-car__img { height: 130px; border-radius: 12px; background: var(--de-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--de-muted); font-size: 14px; }
.de-car__img img { width: 100%; height: 100%; object-fit: cover; }
.de-car__brand { font-size: 14px; color: var(--de-muted); }
.de-car__name { font-family: var(--de-font-head); font-weight: 800; font-size: 19px; line-height: 1.2; }
.de-car__years { font-size: 14px; color: var(--de-muted); }
.de-car .de-btn { min-height: 44px; font-size: 15px; }

.de-brands { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.de-brand { display: flex; justify-content: space-between; align-items: center; min-height: 56px; padding: 0 18px; border: 1px solid var(--de-line); border-radius: var(--de-radius); background: var(--de-white); text-decoration: none; color: var(--de-ink); font-weight: 700; }
.de-brand:hover { border-color: var(--de-blue); color: var(--de-blue); }
.de-brand small { color: var(--de-muted); font-weight: 400; }
.de-letter { font-family: var(--de-font-head); font-weight: 800; font-size: 22px; margin: 28px 0 12px; }

/* Swatches */
.de-swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.de-swatch { width: 48px; height: 48px; border-radius: 12px; border: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); padding: 0; }
.de-swatch--round { border-radius: 50%; }
.de-swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px #FFFFFF, 0 0 0 5px var(--de-blue); }
.de-swatch-label { font-weight: 700; margin-bottom: 12px; }
.de-colors { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.de-colors__controls { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 26px; align-items: flex-start; }
.de-colors__preview { flex: 1 1 340px; min-width: 0; background: var(--de-white); border: 1px solid var(--de-line); border-radius: 24px; padding: 28px; display: flex; justify-content: center; }
.de-colors__preview svg { width: 100%; max-width: 360px; height: auto; }

/* Steps */
.de-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.de-step { display: flex; flex-direction: column; gap: 10px; padding: 26px; background: var(--de-white); border: 1px solid var(--de-line); border-radius: var(--de-radius-l); }
.de-step__num { width: 44px; height: 44px; border-radius: 50%; background: var(--de-blue); color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-family: var(--de-font-head); font-weight: 800; font-size: 20px; }
.de-step p { color: var(--de-muted); }

/* Reviews */
.de-review { margin: 0; display: flex; flex-direction: column; gap: 14px; border: 1px solid var(--de-line); border-radius: var(--de-radius-l); padding: 18px; background: var(--de-white); }
.de-review__img { height: 190px; border-radius: var(--de-radius); background: var(--de-soft); overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--de-muted); font-size: 14px; }
.de-review__img img { width: 100%; height: 100%; object-fit: cover; }
.de-stars { color: var(--de-star); font-size: 18px; letter-spacing: 2px; }
.de-review blockquote { margin: 0; font-size: 17px; }
.de-review figcaption { font-size: 14px; color: var(--de-muted); font-weight: 700; }

/* FAQ */
.de-faq { display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
.de-faq details { background: var(--de-white); border: 1px solid var(--de-line); border-radius: var(--de-radius); padding: 16px 20px; }
.de-faq summary { cursor: pointer; font-size: 17px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.de-faq summary::-webkit-details-marker { display: none; }
.de-faq summary::after { content: "+"; font-family: var(--de-font-head); font-size: 22px; line-height: 1; color: var(--de-blue); }
.de-faq details[open] summary::after { content: "−"; }
.de-faq details p { margin-top: 10px; color: var(--de-muted); }

/* CTA band */
.de-cta { background: var(--de-blue-tint); border-radius: 24px; padding: 40px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.de-cta p { color: #374151; margin-top: 8px; }
.de-code { background: var(--de-amber); color: var(--de-ink); font-weight: 800; padding: 2px 8px; border-radius: 6px; }

/* Model page */
.de-product { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; padding: 32px 0 64px; }
.de-product__media { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.de-product__main { background: var(--de-soft); border: 1px solid var(--de-line); border-radius: 24px; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.de-product__main img { width: 100%; height: 100%; object-fit: cover; }
.de-product__main svg { width: 72%; height: auto; }
.de-product__thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.de-product__thumbs button { padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; background: var(--de-soft); aspect-ratio: 1; cursor: pointer; }
.de-product__thumbs button[aria-pressed="true"] { border-color: var(--de-blue); }
.de-product__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.de-product__buy { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.de-product__buy h1 { font-size: clamp(30px, 3.4vw, 42px); }
.de-product__meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 15px; color: var(--de-muted); }
.de-flag { display: inline-flex; align-items: center; gap: 6px; }
.de-flag i { display: inline-block; width: 18px; height: 12px; border: 1px solid var(--de-line-strong); background: linear-gradient(#FFFFFF 50%, #DC143C 50%); border-radius: 2px; }
.de-price { font-family: var(--de-font-head); font-weight: 800; font-size: 32px; }
.de-price small { font-family: var(--de-font-body); font-weight: 400; font-size: 16px; color: var(--de-muted); }
.de-options { display: grid; gap: 10px; }
.de-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 10px 16px; border: 1px solid var(--de-line-strong); border-radius: 12px; cursor: pointer; background: var(--de-white); font-weight: 700; }
.de-option input { position: absolute; opacity: 0; pointer-events: none; }
.de-option small { display: block; font-weight: 400; color: var(--de-muted); font-size: 14px; }
.de-option:has(input:checked) { border-color: var(--de-blue); box-shadow: inset 0 0 0 1px var(--de-blue); background: var(--de-blue-tint); }
.de-option:has(input:focus-visible) { outline: 3px solid var(--de-blue); outline-offset: 2px; }
.de-coupon { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 2px dashed var(--de-amber); border-radius: 12px; background: #FFF8EB; }
.de-coupon strong { font-family: var(--de-font-head); font-size: 20px; letter-spacing: .04em; }
.de-coupon button { min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--de-ink); background: var(--de-white); font: inherit; font-weight: 700; cursor: pointer; }
.de-fulfil { font-size: 14px; color: var(--de-muted); }
.de-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.de-checklist li { display: flex; gap: 10px; align-items: flex-start; }
.de-checklist svg { flex: 0 0 auto; margin-top: 3px; color: var(--de-blue); }
.de-specs { width: 100%; border-collapse: collapse; }
.de-specs th, .de-specs td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--de-line); vertical-align: top; }
.de-specs th { width: 42%; color: var(--de-muted); font-weight: 600; }
.de-two { display: grid; gap: 40px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.de-sticky-buy { display: none; }
@media (max-width: 760px) {
  .de-sticky-buy { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--de-white); border-top: 1px solid var(--de-line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); gap: 12px; align-items: center; justify-content: space-between; transform: translateY(110%); transition: transform .2s ease; }
  .de-sticky-buy.is-visible { transform: none; }
  .de-sticky-buy__label { font-size: 14px; line-height: 1.3; }
  .de-sticky-buy .de-btn { min-height: 48px; font-size: 16px; }
  body.single-de_model { padding-bottom: 80px; }
}
@media (prefers-reduced-motion: reduce) { .de-sticky-buy { transition: none; } }

/* Articles */
.de-posts { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.de-post-card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--de-ink); }
.de-post-card__img { aspect-ratio: 16 / 10; border-radius: var(--de-radius-l); background: var(--de-soft); overflow: hidden; }
.de-post-card__img img { width: 100%; height: 100%; object-fit: cover; }
.de-post-card h3 { font-size: 21px; }
.de-post-card:hover h3 { color: var(--de-blue); }
.de-article { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; padding: 24px 0 80px; }
.de-article__body { flex: 1 1 560px; min-width: 0; max-width: 720px; }
.de-article__aside { flex: 0 1 340px; min-width: 0; position: sticky; top: 96px; }
.de-prose { font-size: 18px; line-height: 1.75; }
.de-prose > * + * { margin-top: 1.1em; }
.de-prose h2 { font-size: 28px; margin-top: 1.8em; }
.de-prose h3 { font-size: 22px; margin-top: 1.5em; }
.de-prose ul, .de-prose ol { padding-left: 1.3em; }
.de-prose table { width: 100%; border-collapse: collapse; font-size: 16px; display: block; overflow-x: auto; }
.de-prose th, .de-prose td { border: 1px solid var(--de-line); padding: 10px 12px; text-align: left; }
.de-prose th { background: var(--de-soft); }
.de-prose img { border-radius: var(--de-radius); }
.de-prose blockquote { margin-left: 0; padding: 16px 20px; background: var(--de-soft); border-radius: var(--de-radius); }
.de-pagination { margin-top: 48px; display: flex; gap: 8px; flex-wrap: wrap; }
.de-pagination .page-numbers { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--de-line); border-radius: 10px; text-decoration: none; color: var(--de-ink); padding: 0 12px; }
.de-pagination .current { background: var(--de-blue); border-color: var(--de-blue); color: #FFFFFF; }

/* Notify form */
.de-notify { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.de-notify .de-field { flex: 1 1 260px; }

/* Footer */
.de-footer { border-top: 1px solid var(--de-line); margin-top: 0; }
.de-footer .de-wrap { padding-top: 48px; padding-bottom: 36px; display: flex; flex-direction: column; gap: 28px; }
.de-footer__cols { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); font-size: 15px; }
.de-footer__cols ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.de-footer__cols a { color: var(--de-muted); }
.de-footer__title { font-weight: 700; }
.de-footer__note { padding-top: 20px; border-top: 1px solid var(--de-line); font-size: 13px; color: var(--de-muted); }

.de-404 { text-align: center; padding: 96px 0; display: flex; flex-direction: column; align-items: center; gap: 18px; }

/* Mat illustration colours (set by JS on [data-de-colors]) */
.de-mat-fill { fill: var(--de-mat, #1F2124); }
.de-mat-rim { stroke: var(--de-rim, #C62828); }

/* ---------- 1.1: guides, E-E-A-T, TOC ---------- */
.de-article__head { display: flex; flex-direction: column; gap: 14px; margin: 12px 0 24px; }
.de-byline { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 15px; color: var(--de-muted); }
.de-byline span { display: inline-flex; align-items: center; gap: 8px; }
.de-byline img { border-radius: 50%; }
.de-byline svg { color: var(--de-blue); }
.de-article__img { margin: 0 0 28px; border-radius: var(--de-radius-l); overflow: hidden; }
.de-article__img figcaption { font-size: 14px; color: var(--de-muted); padding: 8px 2px 0; }
.de-takeaways { background: var(--de-blue-tint); border-radius: var(--de-radius-l); padding: 22px 24px; margin-bottom: 28px; }
.de-takeaways__title { font-size: 20px; margin-bottom: 12px; }
.de-toc ol { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.de-toc a { color: var(--de-ink); text-decoration: none; }
.de-toc a:hover { color: var(--de-blue); text-decoration: underline; }
.de-toc__title { font-family: var(--de-font-head); font-weight: 800; margin-bottom: 10px; }
.de-toc--desktop { border: 1px solid var(--de-line); border-radius: var(--de-radius); padding: 18px 20px; margin-bottom: 20px; font-size: 15px; }
.de-toc--mobile { border: 1px solid var(--de-line); border-radius: var(--de-radius); padding: 14px 18px; margin-bottom: 24px; }
.de-toc--mobile summary { cursor: pointer; font-weight: 700; min-height: 28px; }
.de-toc--mobile ol { margin-top: 10px; }
@media (min-width: 1000px) { .de-toc--mobile { display: none; } }
@media (max-width: 999px) { .de-toc--desktop { display: none; } }
.de-prose h2, .de-prose h3 { scroll-margin-top: 96px; }
.de-prose a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.de-inline-cta { margin: 2em 0; }
.de-inline-models { margin: 2em 0; }
.de-prose .wp-block-details { border: 1px solid var(--de-line); border-radius: var(--de-radius); padding: 14px 18px; }
.de-prose .wp-block-details summary { font-weight: 700; cursor: pointer; }
.de-sources { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--de-line); font-size: 15px; }
.de-sources h2 { font-size: 22px; margin-bottom: 12px; }
.de-sources ol { padding-left: 1.3em; display: grid; gap: 6px; }
.de-author { display: flex; gap: 18px; align-items: flex-start; border: 1px solid var(--de-line); border-radius: var(--de-radius-l); padding: 22px; margin-top: 24px; background: var(--de-white); }
.de-author--page { border: 0; padding: 0; margin: 0; align-items: center; flex-wrap: wrap; }
.de-author__img { border-radius: 50%; flex: 0 0 auto; }
.de-author__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1 1 280px; }
.de-author__label { font-size: 14px; color: var(--de-muted); font-weight: 700; }
.de-author__name { font-family: var(--de-font-head); font-weight: 800; font-size: 19px; }
.de-author__name a { color: var(--de-ink); text-decoration: none; }
.de-tags { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }

/* ======================================================================
   1.2 — graphics, motion, details
   ====================================================================== */
:root {
  --de-ease: cubic-bezier(.2, .7, .2, 1);
  --de-shadow: 0 12px 28px rgba(31, 35, 40, .08);
  --de-honey: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='48.5'%3E%3Cpath d='M14 0 L28 8.08 L28 24.25 L14 32.33 L0 24.25 L0 8.08 Z M14 32.33 L14 48.5' fill='none' stroke='%231D4ED8' stroke-opacity='.11'/%3E%3C/svg%3E");
  interpolate-size: allow-keywords;
}
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .25s; }

/* Header & logo */
.de-header { transition: box-shadow .25s ease; }
.de-header.is-scrolled { box-shadow: 0 6px 24px rgba(31, 35, 40, .08); }
.de-logo svg { transition: transform .6s var(--de-ease); }
.de-logo:hover svg { transform: rotate(60deg); }
.de-nav a { position: relative; }
.de-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; border-radius: 2px; background: var(--de-blue); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--de-ease); }
.de-nav a:hover::after, .de-nav .current-menu-item > a::after { transform: scaleX(1); }

/* Buttons & controls */
.de-btn { transition: background .2s ease, transform .15s ease, box-shadow .2s ease; }
.de-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(29, 78, 216, .24); }
.de-btn:active { transform: translateY(0) scale(.98); box-shadow: none; }
.de-btn--ghost:hover { box-shadow: none; }
.de-field select, .de-field input, .de-field textarea { transition: border-color .2s ease, box-shadow .2s ease; }
.de-field select:focus, .de-field input:focus, .de-field textarea:focus { outline: none; border-color: var(--de-blue); box-shadow: 0 0 0 4px rgba(29, 78, 216, .14); }
.de-config__msg:not(:empty) { animation: de-rise .35s var(--de-ease) both; }
.de-swatch { transition: transform .15s ease, box-shadow .2s ease; }
.de-swatch:hover { transform: scale(1.07); }
.de-swatch:active { transform: scale(.95); }

/* Mat colours change smoothly */
.de-mat-fill { transition: fill .45s var(--de-ease); }
.de-mat-rim { transition: stroke .45s var(--de-ease); }

/* Cards */
.de-car, .de-brand, .de-feature, .de-step, .de-review { transition: transform .25s var(--de-ease), box-shadow .25s ease, border-color .2s ease; }
.de-car:hover, .de-brand:hover { transform: translateY(-3px); box-shadow: var(--de-shadow); }
.de-car__img { background: var(--de-soft) var(--de-honey); background-size: 28px 48.5px; padding: 14px; }
.de-car__img .de-car-svg { width: 100%; max-width: 220px; height: auto; transition: transform .45s var(--de-ease); }
.de-car:hover .de-car__img .de-car-svg { transform: translateX(6px); }
.de-feature__art svg, .de-step__art svg { width: 100%; max-width: 180px; height: auto; display: block; }
.de-feature:hover, .de-step:hover { box-shadow: var(--de-shadow); }
.de-step { position: relative; }
.de-step__art { margin: -4px 0 4px; }
.de-step__num { margin-top: -38px; margin-left: 6px; box-shadow: 0 0 0 5px var(--de-white); }
.de-post-card__img img, .de-cover svg { transition: transform .5s var(--de-ease); }
.de-post-card:hover .de-post-card__img img, .de-post-card:hover .de-cover svg { transform: scale(1.04); }
.de-cover { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--de-blue-tint) var(--de-honey); background-size: 28px 48.5px; }
.de-cover svg { width: 58%; height: auto; }
.de-cover .de-illus ellipse:first-child { display: none; }

/* Hero stage */
.de-hero { position: relative; overflow: hidden; }
.de-hero::before { content: ""; position: absolute; inset: 0 0 0 52%; background: var(--de-honey); background-size: 28px 48.5px; -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent); mask-image: radial-gradient(closest-side, #000 30%, transparent); pointer-events: none; }
.de-hero .de-wrap { position: relative; }
.de-hero__stage { position: relative; width: 100%; max-width: 440px; display: flex; justify-content: center; padding: 24px 0; }
.de-hero__stage > svg { position: relative; z-index: 1; width: 78%; max-width: 330px; height: auto; filter: drop-shadow(0 18px 30px rgba(31, 35, 40, .12)); }
.de-blob { position: absolute; border-radius: 50%; z-index: 0; }
.de-blob--a { width: 74%; aspect-ratio: 1; background: var(--de-blue-tint); top: 10%; left: 4%; }
.de-blob--b { width: 30%; aspect-ratio: 1; background: #FFF3D6; bottom: 6%; right: 2%; }
.de-hero__photo { position: relative; z-index: 1; width: 86%; aspect-ratio: 4 / 5; box-shadow: 0 24px 48px rgba(31, 35, 40, .16); }
.de-photo { margin: 0; border-radius: 24px; overflow: hidden; }
.de-photo img { width: 100%; height: 100%; object-fit: cover; }
.de-float { position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 8px; background: var(--de-white); border: 1px solid var(--de-line); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 14px; color: var(--de-ink); box-shadow: 0 10px 24px rgba(31, 35, 40, .1); white-space: nowrap; }
.de-float svg { color: var(--de-blue); }
.de-float--1 { top: 14%; left: 0; }
.de-float--2 { top: 48%; right: -2%; }
.de-float--3 { bottom: 10%; left: 6%; }
.de-dots { display: inline-flex; }
.de-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--de-white); margin-right: -5px; }
.de-dots i:last-child { margin-right: 0; }
@media (max-width: 560px) {
  .de-float { font-size: 12px; padding: 6px 10px; }
  .de-float--2 { right: 0; }
}

/* Hero entrance — one orchestrated moment on load */
.de-js .de-hero__text > * { animation: de-rise .6s var(--de-ease) both; }
.de-js .de-hero__text > :nth-child(2) { animation-delay: .06s; }
.de-js .de-hero__text > :nth-child(3) { animation-delay: .12s; }
.de-js .de-hero__text > :nth-child(4) { animation-delay: .18s; }
.de-js .de-hero .de-matpiece { transform-box: fill-box; transform-origin: center; animation: de-drop .6s var(--de-ease) both; animation-delay: calc(.35s + var(--i, 1) * .12s); }
.de-js .de-hero .de-float { animation: de-pop .5s var(--de-ease) both, de-bob 7s ease-in-out 2s infinite; }
.de-js .de-hero .de-float--1 { animation-delay: .95s, 2s; }
.de-js .de-hero .de-float--2 { animation-delay: 1.1s, 2.6s; }
.de-js .de-hero .de-float--3 { animation-delay: 1.25s, 3.2s; }
@keyframes de-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes de-drop { from { opacity: 0; transform: translateY(-16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes de-pop { from { opacity: 0; transform: translateY(8px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes de-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* Small loops inside illustrations */
.de-anim-drop, .de-anim-twinkle, .de-anim-snow { transform-box: fill-box; transform-origin: center; }
.de-anim-drop { animation: de-fall 2.8s ease-in infinite; }
.de-anim-twinkle { animation: de-twinkle 2.4s ease-in-out infinite; }
.de-anim-snow { animation: de-snowfall 5s ease-in-out infinite; }
@keyframes de-fall { 0% { transform: translateY(-8px); opacity: 0; } 20% { opacity: 1; } 70% { transform: translateY(12px); opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }
@keyframes de-twinkle { 0%, 100% { transform: scale(.7); opacity: .5; } 50% { transform: scale(1.1); opacity: 1; } }
@keyframes de-snowfall { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(6px) rotate(20deg); } }

/* Scroll reveal (only elements below the fold at load, so no flash and no layout shift) */
.de-reveal { opacity: 0; transform: translateY(18px); }
.de-reveal.is-in { opacity: 1; transform: none; transition: opacity .6s var(--de-ease), transform .6s var(--de-ease); transition-delay: var(--d, 0s); }

/* Anatomy */
.de-anatomy-wrap { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.de-anatomy-art { flex: 1 1 380px; min-width: 0; background: var(--de-white); border: 1px solid var(--de-line); border-radius: 24px; padding: 20px; }
.de-anatomy { width: 100%; height: auto; display: block; }
.de-anatomy-text { flex: 1 1 380px; min-width: 0; }
.de-legend { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 16px; }
.de-legend li { display: flex; gap: 14px; align-items: flex-start; }
.de-legend__num { flex: 0 0 32px; height: 32px; border-radius: 50%; background: var(--de-blue); color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-family: var(--de-font-head); font-weight: 800; }
.de-legend p { margin-top: 2px; }
.de-anatomy-photo { margin-top: 24px; aspect-ratio: 16 / 9; }
.de-callout { transform-box: fill-box; transform-origin: center; }
.de-anatomy-art.is-in .de-callout { animation: de-ping .7s var(--de-ease) both; }
@keyframes de-ping { 0% { transform: scale(.3); opacity: 0; } 70% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }

/* Colour presets */
.de-presets__list { display: flex; flex-wrap: wrap; gap: 8px; }
.de-preset { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px 0 6px; border: 1px solid var(--de-line-strong); border-radius: 999px; background: var(--de-white); color: var(--de-ink); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; transition: border-color .2s ease, background .2s ease, transform .15s ease; }
.de-preset:hover { border-color: var(--de-blue); }
.de-preset:active { transform: scale(.97); }
.de-preset.is-active { border-color: var(--de-blue); background: var(--de-blue-tint); }
.de-preset__chip { width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto; }

/* Model page: car badge + set diagram */
.de-product__media { position: relative; }
.de-product__car { position: absolute; top: 14px; left: 14px; z-index: 2; width: 128px; background: var(--de-white); border: 1px solid var(--de-line); border-radius: 14px; padding: 6px 10px; box-shadow: 0 8px 18px rgba(31, 35, 40, .08); }
.de-product__car svg { width: 100%; height: auto; display: block; }
.de-setbox { display: flex; gap: 18px; align-items: center; border: 1px solid var(--de-line); border-radius: var(--de-radius-l); padding: 16px 18px; background: var(--de-white); }
.de-setdiagram { width: 92px; flex: 0 0 92px; height: auto; }
.de-piece { transition: opacity .35s ease; }
[data-variant="front"] .p-rear, [data-variant="front"] .p-trunk, [data-variant="set"] .p-trunk { opacity: .12; }
.de-setlegend { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 4px; font-weight: 600; }
.de-setlegend li { display: flex; align-items: center; gap: 8px; transition: color .25s ease; }
.de-setlegend li::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--de-blue); transition: background .25s ease; }
[data-variant="front"] [data-piece="rear"], [data-variant="front"] [data-piece="trunk"], [data-variant="set"] [data-piece="trunk"] { color: #8A939E; text-decoration: line-through; }
[data-variant="front"] [data-piece="rear"]::before, [data-variant="front"] [data-piece="trunk"]::before, [data-variant="set"] [data-piece="trunk"]::before { background: var(--de-line-strong); }
.de-product__main { transition: box-shadow .3s ease; }
.de-product__main img { transition: opacity .25s ease; }

/* Page heroes with art */
.de-page-hero--art .de-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.de-page-hero__text { flex: 1 1 480px; min-width: 0; }
.de-page-hero__art { flex: 0 1 300px; margin: 0; }
.de-page-hero__art svg { width: 100%; max-width: 300px; height: auto; display: block; margin-left: auto; }
.de-page-hero__art.de-photo { aspect-ratio: 4 / 3; flex-basis: 360px; }
@media (max-width: 700px) { .de-page-hero__art { flex-basis: 220px; margin: 0 auto; } }

/* Brands */
.de-mono { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--de-blue-tint); color: var(--de-blue); font-family: var(--de-font-head); font-weight: 800; flex: 0 0 auto; letter-spacing: .02em; }
.de-brand__name { display: inline-flex; align-items: center; gap: 10px; }
.de-brand-hero { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; margin-bottom: 16px; }
.de-hero-cars { display: flex; gap: 8px; margin-bottom: 12px; }
.de-hero-cars svg { width: 110px; height: auto; }

/* CTA band */
.de-cta { position: relative; overflow: hidden; background: var(--de-blue-tint) var(--de-honey); background-size: 28px 48.5px; }
.de-cta > div:first-child { flex: 1 1 380px; }
.de-cta__art { flex: 0 0 150px; }
.de-cta__art svg, .de-cta__art img { width: 150px; height: auto; border-radius: 16px; display: block; }
.de-cta__art .de-illus ellipse:first-child { fill: #FFFFFF; }
@media (max-width: 700px) { .de-cta__art { display: none; } }

/* FAQ open/close animation (progressive) */
.de-faq details::details-content { height: 0; overflow: clip; transition: height .3s var(--de-ease), content-visibility .3s allow-discrete; }
.de-faq details[open]::details-content { height: auto; }
.de-faq summary::after { content: "+"; transition: transform .25s var(--de-ease); }
.de-faq details[open] summary::after { content: "+"; transform: rotate(45deg); }
.de-faq details { transition: border-color .2s ease, box-shadow .2s ease; }
.de-faq details:hover, .de-faq details[open] { border-color: var(--de-line-strong); }

/* Footer & 404 */
.de-footer__strip { height: 16px; background: var(--de-honey); background-size: 28px 48.5px; border-bottom: 1px solid var(--de-line); }
.de-404__art svg { width: 220px; height: auto; }

/* Respect reduced motion everywhere */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .de-reveal { opacity: 1; transform: none; }
  @view-transition { navigation: none; }
}
