/* Quieter visual hierarchy shared by every page. Keep body text, contrast,
   keyboard focus indicators and touch target sizes intact. */
@media screen{
  body[data-page] main :is(.kp-hero h1,.kd-hero h1){font-weight:650}
  body[data-page] main :is(.kp-h2,.kd-h2){font-weight:650}
  body[data-page] main :is(.kp-h3,.kp-card h3,.kd-card-body h3){font-weight:600}
  body[data-page] main .kp-hero__lead{font-weight:400;line-height:1.6}
  body[data-page] main .kp-fact__label{font-weight:500;color:var(--ink-2)}
  body[data-page] main .kp-chip strong{font-weight:550}

  body[data-page="home"] main .kd-hero .kd-hero-lead{
    font-size:14px;font-weight:400;
    line-height:1.65;color:var(--ink-2);max-width:58ch;
  }
  body[data-page="home"] main .kd-hero .kd-fact{
    font-size:15px;font-weight:400;line-height:1.45;color:var(--ink-2);gap:10px;
  }
  body[data-page="home"] main .kd-hero .kd-check{
    width:30px;height:30px;border-width:1px;border-color:#74ad86;color:#23834b;
  }
  body[data-page="home"] main .kd-hero .kd-check .kd-icon{
    width:18px;height:18px;stroke-width:2.2;
  }
  body[data-page="home"] main .kd-hero .kd-assurance{
    box-shadow:0 6px 22px rgba(14,17,22,.08);
  }
  body[data-page="home"] main .kd-hero .kd-assurance strong{font-weight:550}
  body[data-page="home"] main .kd-hero .kd-assurance>.kd-icon{stroke-width:1.5}

  body[data-page] :is(.kd-button,.kp-btn,.btn,.kn-header-cta){
    font-weight:550;border-width:1px;
  }
  body[data-page] :is(.kd-outline,.kp-btn--ghost){
    border-color:var(--line-2);color:var(--ink-2);
  }
  /* Dark sections stay dark in the light theme: keep their secondary actions readable. */
  body[data-page] :is(.kp-cta:not(.kp-cta--light),.kp-section--dark) .kp-btn--ghost,
  body[data-page] .kd-cta .kd-outline{
    color:#eef5ee;border-color:#8da69b;
  }
  body[data-page] :is(.kp-cta:not(.kp-cta--light),.kp-section--dark) .kp-btn--ghost:hover,
  body[data-page] .kd-cta .kd-outline:hover{
    color:#fff;border-color:#eef5ee;background:rgba(255,255,255,.06);
  }
  body[data-page] .kp-cta--light .kp-btn--ghost:hover{
    color:var(--ink-2);border-color:var(--ink-2);background:var(--surface);
  }
  body[data-page] :is(.kd-primary,.kp-btn--primary,.btn-primary,.kn-header-cta){
    box-shadow:0 4px 14px rgba(82,219,132,.12);
  }
  body[data-page] :is(.kd-primary,.kp-btn--primary,.btn-primary,.kn-header-cta):hover{
    box-shadow:0 6px 18px rgba(82,219,132,.18);
  }
  body[data-page] :is(.kd-button,.kp-btn,.btn):hover{transform:translateY(-1px)}
  body[data-page] :is(.kn-nav-trigger,.kn-nav-link){font-weight:550}
  body[data-page] .ktb-link{font-weight:500}
  body[data-page] .ktb-link strong{font-weight:550}
}

@media screen{
  :root[data-theme="dark"] body[data-page="home"] main .kd-hero .kd-check{
    color:#78dea4;border-color:#569c74;
  }
}
@media screen and (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) body[data-page="home"] main .kd-hero .kd-check{
    color:#78dea4;border-color:#569c74;
  }
}

@media screen and (max-width:900px){
  body[data-page="home"] main .kd-hero .kd-outline{color:#eef5ee}
  body[data-page="home"] main .kd-hero .kd-outline:hover{color:#8af0b0;background:transparent}
  body[data-page="home"] main .kd-hero .kd-hero-lead{font-size:15px;color:#c7d1d7;max-width:38ch}
  body[data-page="home"] main .kd-hero .kd-fact{font-size:12px;color:#c7d1d7;gap:7px}
  body[data-page="home"] main .kd-hero .kd-check{width:24px;height:24px;border-color:#569c74;color:#78dea4}
  body[data-page="home"] main .kd-hero .kd-check .kd-icon{width:15px;height:15px}
}
@media screen and (max-width:360px){
  body[data-page="home"] main .kd-hero .kd-fact{font-size:11px;gap:5px}
  body[data-page="home"] main .kd-hero .kd-check{width:21px;height:21px}
}

/* Net prices lead; the amount including VAT follows below. */
body[data-page] main .kea-price{display:inline-flex;flex-direction:column;align-items:flex-start;vertical-align:middle;max-width:100%;font-variant-numeric:tabular-nums;line-height:1.35}
body[data-page] main .kea-price__net{white-space:nowrap}
body[data-page] main .kea-price .kea-price__gross{display:block;margin-top:3px;font-size:11px;font-weight:400;line-height:1.4;color:var(--ink-2);letter-spacing:0;text-transform:none;white-space:normal}
body[data-page] main .kp-price__amount .kea-price{align-items:flex-end;text-align:right}
body[data-page] main .kp-price__amount .kea-price__gross{max-width:19ch}
body[data-page] main .kp-fact__value .kea-price__gross{font-size:12px}
body[data-page] main .kh-price-amount .kea-price__gross{font-size:13px}
body[data-page] main .kh-price-amount .kea-price__gross{color:var(--ink-2)}
body[data-page] main .kp-example__total .kea-price__gross{font-size:12px;color:inherit;opacity:.85}

body[data-page] main .kea-price__net>small{display:inline;font-size:.7em;font-weight:400}

/* Keep the visible net amount uncluttered, but label it in linear text and schema. */
.kea-price__tax-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Visual audit 17.10.2026: prices stay readable in prose and narrow cards. */
body[data-page] main :is(.kp-prose,.kp-callout__body,.kp-faq__answer,.kfq-answer,.pr-rules) p .kea-price{display:inline;vertical-align:baseline;line-height:inherit}
body[data-page] main :is(.kp-prose,.kp-callout__body,.kp-faq__answer,.kfq-answer,.pr-rules) p .kea-price__net{font-weight:650}
body[data-page] main :is(.kp-prose,.kp-callout__body,.kp-faq__answer,.kfq-answer,.pr-rules) p .kea-price .kea-price__gross{display:inline;margin:0;font-size:.78em;font-weight:400;white-space:normal}
body[data-page] main :is(.kp-prose,.kp-callout__body,.kp-faq__answer,.kfq-answer,.pr-rules) p .kea-price__gross::before{content:" ("}
body[data-page] main :is(.kp-prose,.kp-callout__body,.kp-faq__answer,.kfq-answer,.pr-rules) p .kea-price__gross::after{content:")"}
body[data-page] main .kp-example__lines>li,body[data-page] main .kp-example__total{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;align-items:start}
body[data-page] main .kp-example__lines>li>span,body[data-page] main .kp-example__total>span{min-width:0}
body[data-page] main .kp-example__lines>li>span:last-child,body[data-page] main .kp-example__total>span:last-child{text-align:right}
body[data-page] main .kp-example__lines>li>span:last-child .kea-price,body[data-page] main .kp-example__total>span:last-child .kea-price{align-items:flex-end}
body[data-page] main .kp-example__lines .kea-price__gross,body[data-page] main .kp-example__total .kea-price__gross{overflow-wrap:anywhere;white-space:normal;max-width:100%}
.kn-search-result :is(strong,p),.kh-interval-row :is(span,p),.kn-search-result{hyphens:auto;word-break:normal;overflow-wrap:break-word}
.kn-search-box input[type="search"]{padding-right:30px}
body[data-page="home"] .kh-hero-pause[hidden]{display:none!important}
:root[data-theme="dark"] body[data-page="aargau"] .ag-map :is(.m-label,.m-label--muted){fill:#d9e9e1;opacity:1}
@media(max-width:360px){body[data-page="home"] main .kd-hero-facts{grid-template-columns:1fr 1fr;gap:12px}body[data-page="home"] main .kd-hero-facts .kd-fact{min-width:0}body[data-page="home"] main .kd-hero-facts .kd-fact:last-child{grid-column:1 / -1}}

body[data-page] main .kp-example__lines>li>span:last-child{white-space:normal;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:4px}

body[data-page="home"] .kh-scale-label{hyphens:auto;-webkit-hyphens:auto}
@media(max-width:360px){body[data-page="home"] main .kd-hero-facts{display:grid}}

/* Labels must remain readable before the animated route reaches a town. */
body[data-page="aargau"] .ag-map .ag-live .ag-z-pt:not(.is-lit){opacity:1}

/* Shared page architecture: one outer frame for navigation, content and footer.
   Keep card padding and readable prose widths inside that frame. */
:root{
  --kea-layout-max:1400px;
  --kea-layout-gutter:clamp(20px,5vw,40px);
  --pad:var(--kea-layout-gutter);
  --kp-pad:var(--kea-layout-gutter);
  --maxw:var(--kea-layout-max);
}
:root body :is(.kn-container,.kn-utility-inner,.knr-footer-inner,.kea-breadcrumb-wrap),
:root body[data-page] main :is(.kd-wrap,.kp-wrap,.wrap){
  box-sizing:border-box;width:100%;max-width:var(--kea-layout-max);
  margin-inline:auto;padding-inline:var(--kea-layout-gutter);
}
/* Section headings share the same left edge; narrower text stays left anchored. */
:root body[data-page] main .kp-head--center,
:root body[data-page="home"] main :is(.kd-section-head,.kh-glance .kh-head,.kd-values-head){
  text-align:left;margin-inline:0;max-width:68ch;
}
:root body[data-page] main .kp-head--center .kp-eyebrow,
:root body[data-page="home"] main .kd-section-head p{
  margin-inline:0;
}
:root body[data-page="home"] main .kd-section-head p{max-width:62ch}
:root body[data-page="home"] #abschluss .kpf-copy{max-width:var(--kea-layout-max);padding-inline:var(--kea-layout-gutter);text-align:left}
:root body[data-page="home"] #abschluss .kpf-copy :is(h2,.kpf-lead){margin-inline:0}
/* Keep the hero controls and its reassurance card inside the shared right edge. */
@media(min-width:901px){
  :root body[data-page="home"] .kd-hero .kd-assurance{right:var(--kea-layout-gutter)}
  :root body[data-page="home"] .kd-hero .kh-hero-controls{
    right:max(var(--kea-layout-gutter),calc((100% - var(--kea-layout-max))/2 + var(--kea-layout-gutter)));
  }
}
@media(max-width:900px){
  :root body[data-page="home"] .kd-hero .kh-hero-controls{left:var(--kea-layout-gutter);right:auto}
}
/* Legal pages use the same text edge; the contents stays available on the right. */
@media(min-width:1025px){
  :root body[data-page] main .kp-layout{grid-template-columns:minmax(0,1fr) minmax(220px,270px)}
  :root body[data-page] main .kp-layout>.kp-aside{order:2}
}

:root body[data-page="home"] main :is(.kd-values-head,.kd-values .kd-stats-grid){padding-inline:0}
:root body[data-page="home"] main :is(.kd-section-head,.kh-head,.kd-values-head,.kd-knowledge-head,.kh-news__head,.kfq-head) .kd-h2{
  font-size:var(--kp-h2);line-height:1.08;letter-spacing:-.032em;
}

:root body[data-page="home"] #abschluss.kpf-section{padding-inline:0}
:root body[data-page="home"] #abschluss .kpf-toolbar{
  left:max(var(--kea-layout-gutter),calc((100% - var(--kea-layout-max))/2 + var(--kea-layout-gutter)));
  right:max(var(--kea-layout-gutter),calc((100% - var(--kea-layout-max))/2 + var(--kea-layout-gutter)));
}

/* Long technical terms must stay inside narrow prose and information cards. */
:root body[data-page] main :is(.kp-prose,.kp-callout__body,.kp-card__body,.kd-card-body) p{
  hyphens:auto;-webkit-hyphens:auto;overflow-wrap:break-word;
}

/* The archived campaign follows the same left-aligned title and lead. */
:root body[data-page="gratis-chips"] main .chips-intro__inner{text-align:left}
:root body[data-page="gratis-chips"] main .chips-lead{margin-inline:0}

/* Shared two-tone main titles, 19.10.2026: the same olive emphasis as the
   public configurator. Inline markup preserves wording, wrapping and SEO. */
:root{--kea-title-accent:#52684a}
:root[data-theme="dark"]{--kea-title-accent:#9be5b2}
@media(prefers-color-scheme:dark){
  :root:not([data-theme="light"]){--kea-title-accent:#9be5b2}
}
body[data-page] main h1 .kea-title-accent{
  color:var(--kea-title-accent);background:none;
  -webkit-background-clip:border-box;background-clip:border-box;
  -webkit-text-fill-color:currentColor;
}
/* The home hero deliberately has a dark background on small screens,
   including in the light theme. Use the matching light green there. */
@media screen and (max-width:900px){
  body[data-page="home"] main h1 .kea-title-accent{color:#9be5b2}
}
@media(forced-colors:active){
  body[data-page] main h1 .kea-title-accent{color:CanvasText}
}
