/*
 * codepaws website — single global stylesheet.
 *
 * Layout follows the "Final" design canvas: content max 1200px with 24px side
 * padding, fluid grids (auto-fit) instead of fixed breakpoints. The header
 * switches to the hamburger menu at < 768px. Heading sizes are fluid.
 *
 * Cascade layers, lowest to highest priority — a later layer always wins,
 * whatever the selector specificity:
 *   base        fonts, design tokens, element defaults
 *   layout      page frame, sections, rows, grids
 *   components  header, cards, buttons, accordion, footer, back-to-top
 *   pages       start page, legal pages, 404
 *   motion      scroll-driven effects and reduced-motion overrides
 *   print       print version (black on white, legal texts readable)
 *
 * Class names: cp- prefix, single hyphens only (cp-hero-logo, cp-grid-3).
 */

@layer base, layout, components, pages, motion, print;

@layer base {
  /* ---------- Fonts (self-hosted, latin + latin-ext subset) ---------- */

  @font-face {
    font-family: "Kanit";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/kanit-500.05d36c88.woff2") format("woff2");
  }
  @font-face {
    font-family: "Open Sans";
    font-style: italic;
    font-weight: 400 500;
    font-display: swap;
    src: url("../fonts/open-sans-400-italic.9f450367.woff2") format("woff2");
  }
  @font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/open-sans-500.beb288db.woff2") format("woff2");
  }
  @font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/open-sans-700.1d9314f1.woff2") format("woff2");
  }

  /* ---------- Design tokens ---------- */

  :root {
    --cp-bg: #0a0622;
    --cp-text: #f6f6f6;
    --cp-text-muted: rgba(246, 246, 246, 0.5);
    --cp-text-body: rgba(246, 246, 246, 0.8); /* body copy on Night */
    --cp-text-lead: rgba(246, 246, 246, 0.9); /* hero claim, 404 line */
    --cp-line: rgba(246, 246, 246, 0.15);
    --cp-line-soft: rgba(246, 246, 246, 0.1);
    --cp-surface: #130d36; /* card fill */
    --cp-red: #f73146;
    --cp-blue: #0851e5;
    --cp-navy: #092c84; /* dark blue of the palette; not used on the website yet */
    --cp-yellow: #efdf1e;
    /* The one brand gradient, taken from the logo files (left → right). */
    --cp-grad-from: #0053f1;
    --cp-grad-to: #fe2e38;
    --cp-font-heading: "Kanit", Arial, sans-serif;
    --cp-font-body: "Open Sans", Arial, sans-serif;
    --cp-header-height: 73px; /* 72px + 1px border */

    /* Scale */
    --cp-text-xs: 12px;
    --cp-text-sm: 14px;
    --cp-text-base: 16px;
    --cp-text-lg: 18px;
    --cp-text-xl: 20px;
    --cp-text-2xl: 24px;
    --cp-text-3xl: 30px;
    --cp-text-4xl: 36px;
    --cp-text-5xl: 48px;
    --cp-text-6xl: 60px;
    --cp-text-7xl: 72px;
    --cp-text-8xl: 96px;
    --cp-text-9xl: 128px;
    --cp-leading-none: 1;
    --cp-leading-tight: 1.25;
    --cp-leading-snug: 1.375;
    --cp-leading-normal: 1.5;
    --cp-leading-relaxed: 1.625;
    --cp-tracking-widest: 0.1em;
    --cp-radius-sm: 4px;
    --cp-radius-xl: 12px;
    --cp-radius-2xl: 16px;
    --cp-radius-full: 9999px;
    --cp-ease-out: cubic-bezier(0, 0, 0.2, 1);
    --cp-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --cp-shadow-lg:
      0 10px 15px -3px rgba(0, 0, 0, 0.35), 0 4px 6px -4px rgba(0, 0, 0, 0.35);
    --cp-container: 1200px; /* content width incl. side padding */
    --cp-pad: 24px; /* side padding */

    /* Spacing */
    --cp-space-section: clamp(
      72px,
      10vw,
      128px
    ); /* vertical padding of a section */
    --cp-space-module: 24px; /* gap between stacked blocks */
    --cp-gutter: 56px; /* gap between columns */

    /* Hero background, shared by the homepage hero, page title bands and 404 */
    --cp-hero-image: url("../img/header-background.d16c3a83.svg");
    --cp-hero-gradient: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0) 0%,
      var(--cp-bg) 90%
    );
  }

  /* ---------- Base ---------- */

  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  html {
    /* Anchor targets land below the sticky header. */
    scroll-padding-top: var(--cp-header-height);
  }

  @media (prefers-reduced-motion: no-preference) {
    html {
      scroll-behavior: smooth;
    }
  }

  body {
    margin: 0;
    background-color: var(--cp-bg);
    color: var(--cp-text);
    font-family: var(--cp-font-body);
    font-size: var(--cp-text-base);
    font-weight: 500;
    line-height: var(--cp-leading-relaxed);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  /* The footer always sits at the bottom of the screen, also on short pages:
     the page is at least one screen tall and <main> takes the spare room.
     --cp-screen-h = real window height from site.js (some mobile browsers
     report viewport units too small). */
  body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: var(--cp-screen-h, 100dvh);
  }

  main {
    flex: 1 0 auto;
  }

  img {
    max-width: 100%;
    height: auto;
  }

  a {
    color: var(--cp-red);
    text-decoration: none;
  }

  p {
    margin: 0;
    padding-bottom: 1em;
    text-wrap: pretty; /* avoids single-word last lines */
  }

  p:last-child {
    padding-bottom: 0;
  }

  ul {
    margin: 0;
    padding: 0 0 1em 1.25em;
  }

  strong {
    font-weight: 700;
  }

  /* Gradient headings wrapped in "{ … }" — the codepaws signature style. */
  h1,
  h2,
  h3,
  h4 {
    display: inline-block;
    margin: 0;
    padding-bottom: 10px;
    font-family: var(--cp-font-heading);
    font-weight: 500;
    line-height: var(--cp-leading-none);
    color: var(--cp-red);
    background: linear-gradient(90deg, var(--cp-grad-from), var(--cp-grad-to));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  /* Long German words must fit narrow screens. Headings hyphenate only where
     the markup has a soft hyphen (&shy; at compound boundaries — automatic
     hyphenation picks poor break points like "Geschäftsbe-dingungen"); any
     other word breaks as a last resort. Multi-line headings are balanced. The
     braces are glued to the first/last word with a no-break space so they never
     sit alone on a line. */
  h1,
  h2,
  h3,
  h4 {
    max-width: 100%;
    overflow-wrap: break-word;
    -webkit-hyphens: manual;
    hyphens: manual;
    text-wrap: balance;
  }

  h1::before,
  h2::before,
  h3::before,
  h4::before {
    content: "{\00a0";
    content: "{\00a0" / ""; /* decorative: not announced by screen readers */
  }

  h1::after,
  h2::after,
  h3::after,
  h4::after {
    content: "\00a0}";
    content: "\00a0}" / "";
  }

  /* Fluid, reaching the CI guide sizes (60 / 52 / 43 / 36px) on desktop. Below
     ~360px the minimum shrinks with the screen (min(px, vw)) so long words fit. */
  h1 {
    font-size: clamp(min(var(--cp-text-4xl), 10vw), 5vw, var(--cp-text-6xl));
  }
  h2 {
    font-size: clamp(min(var(--cp-text-4xl), 9.4vw), 4vw, var(--cp-text-5xl));
  }
  h3 {
    font-size: clamp(var(--cp-text-2xl), 3vw, var(--cp-text-4xl));
    line-height: var(--cp-leading-tight);
  }
  h4 {
    font-size: clamp(var(--cp-text-xl), 2.5vw, var(--cp-text-3xl));
    line-height: var(--cp-leading-tight);
  }

  .cp-skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 100;
    padding: 8px 16px;
    background: var(--cp-bg);
    color: var(--cp-text);
    font-weight: 700;
  }

  .cp-skip-link:focus {
    top: 8px;
  }

  /* Hidden on screen, still read by screen readers. */
  .cp-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  :focus-visible {
    outline: 2px solid var(--cp-red);
    outline-offset: 2px;
  }
}

@layer layout {
  /* ---------- Layout grid (section / row / column) ---------- */

  .cp-section {
    position: relative;
    padding: var(--cp-space-section) 0;
  }

  .cp-row {
    position: relative;
    max-width: var(--cp-container);
    margin: 0 auto;
    padding: 0 var(--cp-pad);
  }

  /* Column layouts inside a row. --3 and --2 are fluid: as many columns of at
     least 320px / 340px as fit (3 → 2 → 1 for the cards). */
  .cp-grid {
    display: grid;
    gap: var(--cp-space-module) var(--cp-gutter);
  }

  .cp-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  }

  .cp-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    align-items: center;
  }

  /* Body copy with the thin vertical rule on the left. */
  .cp-text {
    padding-left: 28px;
    border-left: 1px solid var(--cp-line);
  }
}

@layer components {
  /* ---------- Header (sticky) ---------- */

  .cp-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--cp-line-soft);
    background-color: var(--cp-bg);
  }

  .cp-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    max-width: var(--cp-container);
    min-height: 72px;
    margin: 0 auto;
    padding: 14px var(--cp-pad);
  }

  /* The logo shrinks to the space left next to the menu (max 40px tall). */
  .cp-header-logo {
    display: flex;
    flex: 0 1 213px;
    align-items: center;
    min-width: 0;
    min-height: 44px;
  }

  .cp-header-logo img {
    display: block;
    width: 100%;
    height: auto;
  }

  /* The list is a popover (opened by the hamburger on tablet/phone). On desktop
     it is shown inline, so the browser's default popover styles are reset. */
  .cp-nav-list {
    position: static;
    display: flex;
    align-items: center;
    gap: 32px;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    background: none;
    color: inherit;
    list-style: none;
    line-height: var(--cp-leading-normal);
  }

  .cp-nav-list a {
    display: block;
    color: var(--cp-text);
    font-size: var(--cp-text-base);
    font-weight: 700;
    transition: color 300ms var(--cp-ease-in-out);
  }

  @media (hover: hover) {
    .cp-nav-list a:hover {
      color: var(--cp-yellow);
    }
  }

  /* Start page: the header is transparent over the hero (the graphic runs up
     behind it, as on the old site) and gets its background and border within
     the first 120px of scrolling. Solid in browsers without scroll-driven
     animations. (On phones the hero fades to Night behind the header, so the
     open menu needs no extra header background.) */
  @supports (animation-timeline: scroll()) {
    body:has(.cp-hero) .cp-header {
      animation: cp-header-solid linear both;
      animation-timeline: scroll(root);
      animation-range: 0 120px;
    }
  }

  @keyframes cp-header-solid {
    from {
      border-bottom-color: rgba(246, 246, 246, 0);
      background-color: rgba(10, 6, 34, 0);
    }
    to {
      border-bottom-color: rgba(246, 246, 246, 0.1);
      background-color: var(--cp-bg);
    }
  }

  /* Scroll progress (legal pages only — they have the title band): 2px
     brand-gradient line on the header's bottom edge. site.js sets
     --cp-progress (0–1) on scroll. */
  .cp-progress {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    display: none;
    height: 2px;
    background: linear-gradient(90deg, var(--cp-grad-from), var(--cp-grad-to));
    transform: scaleX(var(--cp-progress, 0));
    transform-origin: 0 50%;
    will-change: transform;
  }

  body:has(.cp-page-title) .cp-progress {
    display: block;
  }

  .cp-nav-toggle {
    display: none;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background-color: var(--cp-red);
    cursor: pointer;
    mask: url("../icons/menu-2.a7630e8f.svg") center / 32px no-repeat;
  }

  @media (max-width: 767px) {
    .cp-nav-toggle {
      display: block;
    }

    /* Dropdown below the header, full width: unfolds downwards from the
       header's bottom edge (clip-path, so it never overlaps the header) and
       fades in, 200ms; the links follow one after another; the hamburger
       turns into an X. Outside click and Escape close it (popover light dismiss). Hidden by
       default so browsers without popover support never show it open; there
       site.js toggles .is-open instead. */
    .cp-nav-list {
      position: fixed;
      inset: var(--cp-header-height) 0 auto;
      display: none;
      flex-direction: column;
      align-items: stretch;
      gap: 8px;
      padding: 16px var(--cp-pad) 24px;
      border-bottom: 1px solid var(--cp-line-soft);
      background-color: var(--cp-bg);
      text-align: center;
      opacity: 0;
      clip-path: inset(0 0 100% 0);
      transition:
        opacity 200ms var(--cp-ease-out),
        clip-path 200ms var(--cp-ease-out),
        display 200ms allow-discrete,
        overlay 200ms allow-discrete;
    }

    .cp-nav-list li {
      opacity: 0;
      transform: translateY(-6px);
      transition:
        opacity 200ms var(--cp-ease-out),
        transform 200ms var(--cp-ease-out);
    }

    .cp-nav-list.is-open {
      display: flex;
      opacity: 1;
      clip-path: inset(0);
    }

    .cp-nav-list.is-open li {
      opacity: 1;
      transform: none;
    }

    /* Separate rules: browsers that don't know :popover-open drop them. */
    .cp-nav-list:popover-open {
      display: flex;
      opacity: 1;
      clip-path: inset(0);
    }

    .cp-nav-list:popover-open li {
      opacity: 1;
      transform: none;
    }

    /* Stagger only while opening; closing fades everything out together. */
    .cp-nav-list:popover-open li:nth-child(2) {
      transition-delay: 40ms;
    }
    .cp-nav-list:popover-open li:nth-child(3) {
      transition-delay: 80ms;
    }

    @starting-style {
      .cp-nav-list:popover-open {
        opacity: 0;
        clip-path: inset(0 0 100% 0);
      }

      .cp-nav-list:popover-open li {
        opacity: 0;
        transform: translateY(-6px);
      }
    }

    .cp-nav:has(.cp-nav-list:popover-open) .cp-nav-toggle {
      mask-image: url("../icons/x.c0ef7bfc.svg");
    }

    .cp-nav:has(.cp-nav-list.is-open) .cp-nav-toggle {
      mask-image: url("../icons/x.c0ef7bfc.svg");
    }

    .cp-nav-list a {
      padding: 10px 0;
    }

    .cp-nav-list li a.cp-button {
      display: flex;
      justify-content: center;
      margin-top: 8px;
    }
  }

  /* Card with the brand gradient as a 1px border. Also used for contact blocks
     on the legal pages. */
  .cp-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 32px;
    border: 1px solid transparent;
    border-radius: var(--cp-radius-xl);
    background:
      linear-gradient(var(--cp-surface), var(--cp-surface)) padding-box,
      linear-gradient(135deg, var(--cp-grad-from), var(--cp-grad-to)) border-box;
  }

  .cp-card h3 {
    padding-bottom: 0;
    font-size: var(--cp-text-2xl);
    line-height: var(--cp-leading-tight);
  }

  .cp-card p {
    color: var(--cp-text-body);
    font-size: var(--cp-text-base);
  }

  .cp-grid:has(> .cp-card) {
    gap: 24px;
  }

  /* ---------- Buttons (red, 4px radius, bold, 44px tall) ---------- */

  /* Solid: Night text on Red; hover = transparent with red text. Outline: the
     reverse. Same look as the header "Kontakt" button. */
  .cp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border: 2px solid var(--cp-red);
    border-radius: var(--cp-radius-sm);
    background-color: var(--cp-red);
    color: var(--cp-bg);
    font-size: var(--cp-text-base);
    font-weight: 700;
    line-height: var(--cp-leading-none);
    transition:
      background-color 200ms var(--cp-ease-out),
      color 200ms var(--cp-ease-out);
  }

  .cp-nav-list a.cp-button {
    display: inline-flex;
    color: var(--cp-bg);
    transition:
      background-color 200ms var(--cp-ease-out),
      color 200ms var(--cp-ease-out);
  }

  @media (hover: hover) {
    .cp-button:hover,
    .cp-nav-list a.cp-button:hover {
      background-color: transparent;
      color: var(--cp-red);
    }
  }

  .cp-button-outline {
    background-color: transparent;
    color: var(--cp-red);
  }

  @media (hover: hover) {
    .cp-button-outline:hover {
      background-color: var(--cp-red);
      color: var(--cp-bg);
    }
  }

  /* Accordion (native <details>; site.js adds the slide animation): gradient
     card, title + edition date on the left, yellow chevron on the right. */
  .cp-toggle {
    border: 1px solid transparent;
    border-radius: var(--cp-radius-2xl);
    background:
      linear-gradient(var(--cp-surface), var(--cp-surface)) padding-box,
      linear-gradient(135deg, var(--cp-grad-from), var(--cp-grad-to)) border-box;
  }

  .cp-toggle:not(:last-child) {
    margin-bottom: 24px;
  }

  /* Title (h2) and edition date stacked on the left, chevron on the right. */
  .cp-toggle summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px 24px;
    min-height: 44px;
    padding: clamp(24px, 3vw, 32px);
    border-radius: calc(
      var(--cp-radius-2xl) - 1px
    ); /* card radius minus its 1px border */
    list-style: none;
    cursor: pointer;
    transition: background-color 300ms var(--cp-ease-in-out);
  }

  @media (hover: hover) {
    .cp-toggle summary:hover {
      background-color: rgba(246, 246, 246, 0.05);
    }
  }

  /* Open: the header joins the content below, so only its top is rounded. */
  .cp-toggle[open] summary {
    border-radius: calc(var(--cp-radius-2xl) - 1px)
      calc(var(--cp-radius-2xl) - 1px) 0 0;
  }

  .cp-toggle summary::-webkit-details-marker {
    display: none;
  }

  .cp-toggle-title {
    justify-self: start;
    padding-bottom: 0;
    font-size: clamp(var(--cp-text-xl), 2.4vw, var(--cp-text-3xl));
    line-height: var(--cp-leading-tight);
  }

  .cp-toggle-meta {
    color: var(--cp-text-muted);
    font-size: var(--cp-text-sm);
    line-height: var(--cp-leading-normal);
  }

  /* Yellow chevron; points up while open. site.js adds .is-closing so it turns
     back together with the closing slide ([open] is only removed at the end). */
  .cp-toggle summary::after {
    content: "";
    grid-row: 1 / span 2;
    grid-column: 2;
    width: 28px;
    height: 28px;
    background-color: var(--cp-yellow);
    mask: url("../icons/chevron-down.30a76843.svg") center / contain no-repeat;
    transition: transform 500ms var(--cp-ease-in-out);
  }

  .cp-toggle[open]:not(.is-closing) summary::after {
    transform: rotate(180deg);
  }

  .cp-toggle-content {
    padding: 32px clamp(24px, 3vw, 32px) clamp(28px, 4vw, 40px);
    border-top: 1px solid var(--cp-line-soft);
    color: var(--cp-text-body);
    overflow-wrap: break-word; /* long compounds on narrow phones */
  }

  .cp-toggle-content p {
    padding-bottom: 14px;
  }

  /* Numbered section headings: Snow, number in Yellow, no braces. */
  .cp-toggle-content h3 {
    display: block;
    margin-top: 24px;
    padding-bottom: 14px;
    background: none;
    color: var(--cp-text);
    -webkit-text-fill-color: currentColor;
    font-size: var(--cp-text-xl);
    line-height: var(--cp-leading-tight);
  }

  .cp-toggle-content h3:first-child {
    margin-top: 0;
  }

  .cp-toggle-content h3::before,
  .cp-toggle-content h3::after {
    content: none;
  }

  .cp-toggle-num {
    color: var(--cp-yellow);
  }

  .cp-toggle-content ul {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 0 14px;
    line-height: var(--cp-leading-relaxed);
    list-style: none;
  }

  .cp-toggle-content li {
    position: relative;
    padding-left: 24px;
  }

  .cp-toggle-content li::before {
    content: "";
    position: absolute;
    top: 0.68em;
    left: 2px;
    width: 8px;
    height: 8px;
    border-radius: var(--cp-radius-full);
    background-color: var(--cp-yellow);
  }

  /* ---------- Footer ---------- */

  .cp-footer {
    border-top: 1px solid var(--cp-line-soft);
  }

  .cp-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: var(--cp-container);
    margin: 0 auto;
    padding: 36px var(--cp-pad) calc(36px + env(safe-area-inset-bottom));
  }

  .cp-footer-brand {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
  }

  .cp-footer-logo {
    display: block;
    width: auto;
    height: 32px;
  }

  .cp-footer-copyright {
    padding-bottom: 0;
    color: var(--cp-text-muted);
    font-size: var(--cp-text-sm);
  }

  .cp-footer-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    margin: 0;
    padding: 0;
    font-size: var(--cp-text-sm);
    list-style: none;
    line-height: var(--cp-leading-normal);
  }

  .cp-footer-menu a {
    color: var(--cp-text);
    font-weight: 700;
    transition: color 300ms var(--cp-ease-in-out);
  }

  @media (hover: hover) {
    .cp-footer-menu a:hover {
      color: var(--cp-yellow);
    }
  }

  /* Phones: logo, copyright and links stacked and centred. */
  @media (max-width: 767px) {
    .cp-footer-inner,
    .cp-footer-brand {
      flex-direction: column;
      justify-content: center;
      text-align: center;
    }

    .cp-footer-inner {
      gap: 16px;
    }

    .cp-footer-brand {
      gap: 12px;
    }

    .cp-footer-menu {
      justify-content: center;
      gap: 0 20px;
    }

    /* 44px tall tap targets. */
    .cp-footer-menu a {
      display: inline-flex;
      align-items: center;
      min-height: 44px;
      padding: 0 4px;
    }
  }

  /* Back-to-top button (legal pages only — they have the title band): yellow
     circle fixed bottom right (also over the footer). site.js adds .is-shown
     once the page has been scrolled a little. */
  .cp-to-top {
    display: none;
  }

  body:has(.cp-page-title) .cp-to-top {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 2px solid var(--cp-yellow);
    border-radius: var(--cp-radius-full);
    background-color: var(--cp-yellow);
    box-shadow: var(--cp-shadow-lg);
    -webkit-tap-highlight-color: transparent;
    visibility: hidden;
    opacity: 0;
    transform: translateY(16px) scale(0.8);
    transition:
      opacity 200ms var(--cp-ease-out),
      transform 200ms var(--cp-ease-out),
      visibility 200ms,
      background-color 200ms var(--cp-ease-out);
  }

  body:has(.cp-page-title) .cp-to-top.is-shown {
    visibility: visible;
    opacity: 1;
    transform: none;
  }

  /* Hover only with a mouse — on touch screens it would stick after the tap. */
  @media (hover: hover) {
    body:has(.cp-page-title) .cp-to-top:hover {
      background-color: var(--cp-bg);
    }

    .cp-to-top:hover .cp-to-top-icon {
      background-color: var(--cp-yellow);
    }
  }

  .cp-to-top-icon {
    width: 24px;
    height: 24px;
    background-color: var(--cp-bg);
    mask: url("../icons/chevron-down.30a76843.svg") center / contain no-repeat;
    transform: rotate(180deg);
    transition: background-color 200ms var(--cp-ease-out);
  }

  @media (min-width: 768px) {
    body:has(.cp-page-title) .cp-to-top {
      right: 24px;
      bottom: 24px;
    }
  }
}

@layer pages {
  /* ---------- Hero (home) / page title band (subpages) ---------- */

  /*
   * Full-screen hero: viewport height minus the sticky header. Logo and claim
   * are vertically centred (logo ≈ 0.518 × its width tall, claim ≈ 110px), and
   * the background graphic is positioned relative to the logo so the logo icon
   * always sits in the same spot of the brace graphic as on the old site.
   * The graphic's yellow line is cropped at the image's top edge, so that edge
   * must never show inside the hero. Where the centred logo sits low (phones,
   * tall screens), the graphic is enlarged around the logo icon until its top
   * reaches the hero top — the icon stays in the same spot of the bracket.
   *
   * header-background.svg (1080×661): icon centre at (539, 208) = 0.49907 ×
   * width from the left and 0.19259 × width from the top; at the anchored size
   * (3.752 × logo width) it lies 0.1291 × logo width below the logo top.
   */
  .cp-hero {
    --cp-logo-w: min(80vw, 640px);
    /* --cp-screen-h: the window's real inner height, set by site.js — some
       mobile browsers (e.g. Chrome on iOS) report viewport units smaller than
       the area they show. Fallback without JS: 100svh / 100lvh. */
    --cp-hero-h: calc(var(--cp-screen-h, 100svh) - var(--cp-header-height));
    --cp-hero-top: max(
      32px,
      calc((var(--cp-hero-h) - 0.518 * var(--cp-logo-w) - 110px) / 2)
    );
    --cp-hero-icon-y: calc(
      var(--cp-header-height) + var(--cp-hero-top) + 0.1291 * var(--cp-logo-w)
    );
    --cp-hero-fade: 0px; /* top band covered by the fade (phones, see below) */
    --cp-hero-bg-w: max(
      3.752 * var(--cp-logo-w),
      (var(--cp-hero-icon-y) - var(--cp-hero-fade)) / 0.19259
    );
    position: relative;
    /* The hero starts at the very top, behind the transparent header (see
       "Header"), and fills the whole screen. */
    min-height: var(--cp-screen-h, 100lvh);
    margin-top: calc(-1 * var(--cp-header-height));
    text-align: center;
  }

  .cp-hero-parallax {
    position: absolute;
    inset: 0;
    overflow: hidden;
  }

  /* Icon centre of the graphic on the logo icon (see above). Moves with the
     scroll on devices with a mouse (see "Scroll effects"); the gradient stays
     on top. */
  .cp-hero-parallax-bg {
    position: absolute;
    top: calc(var(--cp-hero-icon-y) - 0.19259 * var(--cp-hero-bg-w));
    left: calc(50% - 0.49907 * var(--cp-hero-bg-w));
    width: var(--cp-hero-bg-w);
    aspect-ratio: 1080 / 661;
    background: var(--cp-hero-image) 0 0 / 100% 100% no-repeat;
  }

  .cp-hero-gradient {
    position: absolute;
    inset: 0;
    background: var(--cp-hero-gradient);
  }

  /* Phones: the top (behind the header) fades into Night, so the graphic only
     needs to reach up to the header's bottom edge — it stays smaller and does
     not run behind the logo. */
  @media (max-width: 767px) {
    .cp-hero {
      --cp-hero-fade: var(--cp-header-height);
    }

    .cp-hero-gradient {
      background:
        linear-gradient(
          180deg,
          var(--cp-bg) 0,
          var(--cp-bg) var(--cp-header-height),
          rgba(10, 6, 34, 0) calc(var(--cp-header-height) + 56px)
        ),
        var(--cp-hero-gradient);
    }
  }

  .cp-hero-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: calc(var(--cp-header-height) + var(--cp-hero-top)) 24px 88px;
  }

  /* The page's <h1> is the hero logo (aria-label = heading text): no gradient,
     braces or heading metrics. */
  .cp-hero-title {
    display: block;
    padding: 0;
    background: none;
    -webkit-text-fill-color: currentColor;
    font-size: 0;
    line-height: 0;
  }

  .cp-hero-title::before,
  .cp-hero-title::after {
    content: none;
  }

  /* Stacked logo as inline SVG so it can be drawn in (see "Hero logo"). */
  .cp-hero-logo {
    display: block;
    width: var(--cp-logo-w);
    height: auto;
    overflow: visible;
  }

  .cp-hero-logo-outline {
    display: none;
    fill: none;
    stroke: url("#cp-hero-logo-gradient");
    stroke-width: 1.1;
    stroke-linejoin: round;
  }

  .cp-hero-logo-icon {
    fill: url("#cp-hero-logo-gradient");
    fill-rule: evenodd;
  }

  /* Cover the paw cut-outs while the icon fills in; hidden when static. */
  .cp-hero-logo-paw {
    fill: url("#cp-hero-logo-gradient");
    opacity: 0;
  }

  .cp-hero-logo-word {
    fill: var(--cp-text);
  }

  .cp-hero-claim {
    max-width: 36ch;
    min-height: 2.75em; /* two lines reserved while the claim types itself */
    padding: 0;
    color: var(--cp-text-lead);
    font-family: var(--cp-font-heading);
    font-size: clamp(var(--cp-text-xl), 2.2vw, var(--cp-text-3xl));
    line-height: var(--cp-leading-snug);
  }

  /* Typewriter: site.js wraps each character of the claim in .cp-type-char
     with --i = its index. */
  .cp-type-char {
    opacity: 0;
    animation: cp-type-in 1ms linear forwards;
    animation-delay: calc(2.5s + var(--i) * 18ms);
  }

  @keyframes cp-type-in {
    to {
      opacity: 1;
    }
  }

  /* Hero logo: outline draws (0.3–1.6s) and fades, the icon fills (1.3–1.9s),
     the paw appears (1.95s), then the letters rise one by one (from 2.2s). */
  @media (prefers-reduced-motion: no-preference) {
    .cp-hero-logo-outline {
      display: inline;
      stroke-dasharray: 1;
      stroke-dashoffset: 1;
      animation:
        cp-logo-draw 1.3s ease-in-out 0.3s forwards,
        cp-logo-fade 0.5s ease-in-out 1.65s forwards;
    }

    .cp-hero-logo-fill {
      transform-box: fill-box;
      transform-origin: 50% 50%;
      animation: cp-logo-fill 0.6s ease-out 1.3s both;
    }

    .cp-hero-logo-paw {
      opacity: 1;
      animation: cp-logo-fade 1ms linear 1.95s forwards;
    }

    .cp-hero-logo-word > * {
      transform-box: fill-box;
      transform-origin: 50% 100%;
      animation: cp-logo-rise 0.55s cubic-bezier(0.2, 0.9, 0.3, 1) both;
    }

    .cp-hero-logo-word > :nth-child(1) {
      animation-delay: 2.2s;
    }
    .cp-hero-logo-word > :nth-child(2) {
      animation-delay: 2.27s;
    }
    .cp-hero-logo-word > :nth-child(3) {
      animation-delay: 2.34s;
    }
    .cp-hero-logo-word > :nth-child(4) {
      animation-delay: 2.41s;
    }
    .cp-hero-logo-word > :nth-child(5) {
      animation-delay: 2.48s;
    }
    .cp-hero-logo-word > :nth-child(6) {
      animation-delay: 2.55s;
    }
    .cp-hero-logo-word > :nth-child(7) {
      animation-delay: 2.62s;
    }
    .cp-hero-logo-word > :nth-child(8) {
      animation-delay: 2.69s;
    }
  }

  @keyframes cp-logo-draw {
    to {
      stroke-dashoffset: 0;
    }
  }

  @keyframes cp-logo-fade {
    to {
      opacity: 0;
    }
  }

  @keyframes cp-logo-fill {
    from {
      opacity: 0;
      transform: scale(0.94);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes cp-logo-rise {
    from {
      opacity: 0;
      transform: translateY(40%);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  /* Scroll cue at the bottom of the hero (48px target, 40px icon, gently
     bobbing). The icon is a masked child so the focus outline is not clipped. */
  .cp-hero-scroll {
    position: absolute;
    bottom: var(--cp-hero-cue-bottom, calc(28px + 100lvh - 100svh));
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--cp-radius-full);
    transform: translateX(-50%);
  }

  .cp-hero-scroll-icon {
    display: block;
    width: 40px;
    height: 40px;
    background-color: var(--cp-yellow);
    mask: url("../icons/circle-chevron-down.8f5d0617.svg") center / contain no-repeat;
  }

  @media (prefers-reduced-motion: no-preference) {
    .cp-hero-scroll-icon {
      animation: cp-bob 2.4s ease-in-out infinite;
    }
  }

  @keyframes cp-bob {
    0%,
    100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(5px);
    }
  }

  /* Title band of the subpages: the brace graphic behind a fade into Night. */
  .cp-page-title {
    padding: clamp(72px, 9vw, 112px) 0 clamp(48px, 6vw, 80px);
    background:
      linear-gradient(180deg, rgba(10, 6, 34, 0.45) 0%, var(--cp-bg) 100%),
      var(--cp-hero-image) center 38% / max(1300px, 110%) auto no-repeat;
  }

  .cp-page-title h1 {
    padding-bottom: 0;
    font-size: clamp(min(var(--cp-text-4xl), 11vw), 6vw, var(--cp-text-7xl));
    line-height: var(--cp-leading-none);
  }

  /* ---------- Über Uns ---------- */

  .cp-about {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 48px 80px;
  }

  @media (max-width: 767px) {
    .cp-about {
      row-gap: 24px;
    }
  }

  .cp-about-title,
  #leistungen h2 {
    padding-bottom: 0;
  }

  #leistungen {
    padding-top: 0;
  }

  #leistungen > .cp-row:first-child {
    margin-bottom: 56px;
  }

  .cp-about-title {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .cp-about-body {
    display: flex;
    flex: 1 1 560px;
    flex-direction: column;
    gap: 28px;
    min-width: 0;
  }

  .cp-lead {
    padding: 0;
    font-family: var(--cp-font-heading);
    font-size: clamp(var(--cp-text-2xl), 2.4vw, var(--cp-text-3xl));
    line-height: var(--cp-leading-tight);
  }

  .cp-about-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 24px 40px;
    color: var(--cp-text-body);
  }

  .cp-about-columns .cp-text {
    padding-bottom: 0;
  }

  /* ---------- Leistungen (services) ---------- */

  /* Brace-shaped icon tile. */
  .cp-service-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    aspect-ratio: 108 / 92; /* brace shape */
    background: 50% / contain no-repeat;
  }

  .cp-service-icon img {
    width: auto;
    height: 32px;
  }

  .cp-service-icon-yellow {
    background-image: url("../img/braces-yellow.686d18e4.svg");
  }
  .cp-service-icon-red {
    background-image: url("../img/braces-red.2f0540e1.svg");
  }
  .cp-service-icon-blue {
    background-image: url("../img/braces-blue.79e40c78.svg");
  }

  /* ---------- Kontakt ---------- */

  /* Full-width band with the brace graphic on the right, fading into Night at
     the top, bottom and towards the text. */
  .cp-contact {
    background:
      linear-gradient(
        180deg,
        var(--cp-bg) 0%,
        rgba(10, 6, 34, 0) 22%,
        rgba(10, 6, 34, 0) 78%,
        var(--cp-bg) 100%
      ),
      linear-gradient(90deg, var(--cp-bg) 25%, rgba(10, 6, 34, 0.55) 100%),
      var(--cp-hero-image) right -140px center / min(1100px, 110%) auto
        no-repeat;
  }

  .cp-contact h2 {
    padding-bottom: 0;
  }

  .cp-contact .cp-text {
    max-width: 44ch;
    margin-top: 24px;
    color: var(--cp-text-body);
  }

  .cp-contact-items {
    display: flex;
    flex-direction: column;
    gap: 32px;
  }

  .cp-contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
  }

  .cp-contact-item > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }

  .cp-contact-icon {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 64px;
    aspect-ratio: 108 / 92; /* brace shape */
    background: 50% / contain no-repeat;
  }

  .cp-contact-icon-red {
    background-image: url("../img/braces-red.2f0540e1.svg");
  }
  .cp-contact-icon-blue {
    background-image: url("../img/braces-blue.79e40c78.svg");
  }

  .cp-contact-icon img {
    display: block;
    width: 24px;
    height: 24px;
  }

  /* Small uppercase label instead of a gradient heading. */
  .cp-contact-label {
    display: block;
    padding: 0;
    background: none;
    color: var(--cp-text-muted);
    -webkit-text-fill-color: currentColor;
    font-size: var(--cp-text-sm);
    letter-spacing: var(--cp-tracking-widest);
    line-height: var(--cp-leading-snug);
    text-transform: uppercase;
  }

  .cp-contact-label::before,
  .cp-contact-label::after {
    content: none;
  }

  .cp-contact-value {
    padding: 0;
    font-size: var(--cp-text-lg);
    line-height: var(--cp-leading-normal);
  }

  .cp-contact-value-mail a {
    color: var(--cp-text);
    font-family: var(--cp-font-heading);
    font-size: clamp(var(--cp-text-2xl), 2.6vw, var(--cp-text-4xl));
    line-height: var(--cp-leading-tight);
    overflow-wrap: anywhere;
    background: linear-gradient(90deg, var(--cp-grad-from), var(--cp-grad-to)) 0
      100% / 100% 2px no-repeat;
    transition: color 300ms var(--cp-ease-in-out);
  }

  @media (hover: hover) {
    .cp-contact-value-mail a:hover {
      color: var(--cp-yellow);
    }
  }

  /* Phones: the address shrinks with the row so it stays on one line
     (text width ≈ 8.9 × font size; row = 100vw − 48px − icon − gap). */
  @media (max-width: 767px) {
    .cp-contact-value-mail a {
      font-size: clamp(var(--cp-text-lg), 11.3vw - 15px, var(--cp-text-2xl));
    }
  }

  /* ---------- Legal pages ---------- */

  /* The text section follows the title band closely. */
  .cp-page-title + .cp-section {
    padding-top: 24px;
  }

  /* Section list (sticky on desktop) next to the text. */
  .cp-legal {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 48px 80px;
  }

  .cp-toc {
    position: sticky;
    top: calc(var(--cp-header-height) + 32px);
    flex: 1 1 220px;
  }

  .cp-toc ul {
    padding: 0;
    font-size: var(--cp-text-sm);
    font-weight: 700;
    line-height: var(--cp-leading-snug);
    list-style: none;
  }

  .cp-toc a {
    display: block;
    -webkit-tap-highlight-color: transparent;
    padding: 8px 0 8px 16px;
    border-left: 1px solid var(--cp-line);
    color: var(--cp-text-body);
    transition:
      color 300ms var(--cp-ease-in-out),
      border-color 300ms var(--cp-ease-in-out);
  }

  @media (hover: hover) {
    .cp-toc a:hover {
      border-left-color: var(--cp-yellow);
      color: var(--cp-yellow);
    }
  }

  .cp-legal-body {
    flex: 999 1 560px;
    min-width: 0;
    max-width: 780px;
    color: var(--cp-text-body);
  }

  /* Without a section list (Impressum) the text uses the full row width. */
  .cp-legal:not(:has(.cp-toc)) .cp-legal-body {
    max-width: none;
  }

  .cp-legal-section {
    scroll-margin-top: calc(var(--cp-header-height) + 32px);
  }

  .cp-legal-section:not(:last-child) {
    margin-bottom: 64px;
  }

  /* Heading, text and card blocks of a section, 20px apart. */
  .cp-legal-section > * + * {
    margin-top: 20px;
  }

  .cp-legal-body h2 {
    padding-bottom: 0;
    font-size: clamp(var(--cp-text-2xl), 2.6vw, var(--cp-text-4xl));
    line-height: var(--cp-leading-tight);
  }

  /* Sub-headings: same gradient + braces style, one step smaller. */
  .cp-legal-body h3 {
    margin-top: 36px;
    padding-bottom: 0;
    font-size: clamp(var(--cp-text-xl), 2vw, var(--cp-text-2xl));
    line-height: var(--cp-leading-tight);
  }

  .cp-legal-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 24px 48px;
    padding: clamp(24px, 4vw, 40px);
    border-radius: var(--cp-radius-xl);
  }

  .cp-legal-card p {
    padding-bottom: 0;
  }

  .cp-legal-card strong {
    color: var(--cp-text);
  }

  /* Text links with the gradient underline. */
  .cp-legal-body p a,
  .cp-toggle-content a {
    padding-bottom: 2px;
    color: var(--cp-text);
    background: linear-gradient(90deg, var(--cp-grad-from), var(--cp-grad-to)) 0
      100% / 100% 2px no-repeat;
    transition: color 300ms var(--cp-ease-in-out);
  }

  @media (hover: hover) {
    .cp-legal-body p a:hover,
    .cp-toggle-content a:hover {
      color: var(--cp-yellow);
    }
  }

  @media (max-width: 1023px) {
    .cp-toc {
      position: static;
    }
  }

  /* ---------- 404 ---------- */

  /* Fills the space between header and footer, so the footer is on screen. */
  main:has(> .cp-error) {
    display: flex;
    flex-direction: column;
  }

  .cp-error {
    display: flex;
    flex: 1 0 auto;
    align-items: center;
    justify-content: center;
    padding: 56px 0;
    background:
      var(--cp-hero-gradient),
      var(--cp-hero-image) 50% 0 / cover no-repeat;
    text-align: center;
  }

  .cp-error-content {
    width: 80%;
    max-width: 720px;
  }

  .cp-error-icon {
    display: block;
    width: 108px;
    height: auto;
    margin: 0 auto 24px;
  }

  /* Scales with the screen so "{ 404 }" (≈ 3em, unbreakable) always fits. */
  .cp-error-code {
    font-size: clamp(var(--cp-text-7xl), 25vw, var(--cp-text-9xl));
    line-height: var(--cp-leading-none);
  }

  /* Same text styles as the homepage: hero claim and body copy. */
  .cp-error-title {
    padding-bottom: 12px;
    color: var(--cp-text-lead);
    font-family: var(--cp-font-heading);
    font-size: clamp(var(--cp-text-xl), 2.2vw, var(--cp-text-3xl));
    line-height: var(--cp-leading-snug);
  }

  .cp-error-content p:not(.cp-error-title) {
    color: var(--cp-text-body);
    text-wrap: balance;
  }

  .cp-error-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
  }

  /* Phones: "Zur Startseite" full width; Leistungen and Kontakt share the
     second row (each takes its own row when there isn't room for both). */
  @media (max-width: 767px) {
    /* Tighter on phones so the footer stays on screen. */
    .cp-error {
      padding: 32px 0;
    }

    .cp-error-icon {
      width: 72px;
      margin-bottom: 16px;
    }

    .cp-error-actions {
      gap: 12px;
      margin-top: 24px;
    }

    .cp-error-actions .cp-button {
      flex: 1 1 120px;
    }

    .cp-error-actions .cp-button:first-child {
      flex-basis: 100%;
    }
  }
}

@layer motion {
  /* ---------- Scroll effects (CSS scroll-driven animations) ---------- */

  /*
   * [data-reveal] blocks (start page only) rise 40px, fade in and un-blur while
   * they enter the viewport (from 5% entered until 30% of the way through).
   * The contact block is the last one on the page, so it finishes as soon as it
   * is fully visible — it always completes, even when scrolled to the bottom.
   * Browsers without scroll-driven animations, and reduced motion, show
   * everything immediately.
   */
  @supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
      [data-reveal] {
        animation: cp-reveal linear both;
        animation-timeline: view();
        animation-range: entry 5% cover 30%;
      }

      /* Cards in a row reveal one after another. */
      .cp-grid-3 > .cp-card:nth-child(3n + 2) {
        animation-range: entry 12% cover 34%;
      }

      .cp-grid-3 > .cp-card:nth-child(3n + 3) {
        animation-range: entry 19% cover 38%;
      }

      .cp-contact [data-reveal],
      .cp-contact[data-reveal] {
        animation-range: entry 5% entry 100%;
      }

      /* Logo and claim move up, shrink and fade over the first 60% of a
         screen of scrolling (page scroll, so always untouched at the top). */
      .cp-hero-content {
        animation: cp-hero-out linear both;
        animation-timeline: scroll(root);
        animation-range: 0 calc(0.6 * var(--cp-screen-h, 100svh));
      }
    }

    /* Hero parallax: over the first screen of scrolling the image layer moves
       down by 30% of the distance scrolled; at the top it sits exactly where it
       is anchored. */
    @media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
      .cp-hero-parallax-bg {
        animation: cp-parallax linear both;
        animation-timeline: scroll(root);
        animation-range: 0 var(--cp-screen-h, 100svh);
      }
    }
  }

  @keyframes cp-parallax {
    from {
      transform: translateY(0);
    }
    to {
      transform: translateY(calc(0.3 * var(--cp-screen-h, 100svh)));
    }
  }

  @keyframes cp-hero-out {
    to {
      opacity: 0;
      transform: translateY(-80px) scale(0.94);
    }
  }

  @keyframes cp-reveal {
    from {
      opacity: 0;
      filter: blur(6px);
      transform: translateY(40px);
    }
    to {
      opacity: 1;
      filter: none;
      transform: none;
    }
  }

  /* ---------- Reduced motion ---------- */

  /* Scroll effects, parallax, hero animations and smooth scrolling are only
     enabled under prefers-reduced-motion: no-preference (see above); these are
     the remaining always-on animations. */
  @media (prefers-reduced-motion: reduce) {
    .cp-toggle summary::after,
    .cp-nav-toggle,
    .cp-nav-list,
    .cp-nav-list li {
      transition: none;
    }
  }
}

@layer print {
  /* Printing (mostly the legal texts): black text on white paper, no dark
     backgrounds, gradients, animations or navigation; all accordions open
     (CSS ::details-content where supported, site.js opens them before
     printing); external link targets written out. */
  @media print {
    @page {
      margin: 18mm 16mm;
    }

    :root {
      --cp-bg: #fff;
      --cp-surface: #fff;
      --cp-text: #000;
      --cp-text-body: #222;
      --cp-text-lead: #000;
      --cp-text-muted: #555;
      --cp-line: #bbb;
      --cp-line-soft: #ccc;
      --cp-yellow: #000;
    }

    *,
    *::before,
    *::after {
      animation: none;
      transition: none;
    }

    body {
      display: block;
      min-height: 0;
      background: #fff;
      color: #000;
      font-size: 11pt;
      line-height: 1.5;
    }

    /* Navigation and screen-only helpers */
    .cp-skip-link,
    .cp-nav,
    .cp-progress,
    .cp-to-top,
    .cp-toc,
    .cp-hero-parallax,
    .cp-hero-scroll,
    .cp-footer-menu,
    .cp-error-actions {
      display: none;
    }

    /* Header: logo only, in one colour (Mono variant) */
    .cp-header {
      position: static;
      border-bottom: 1px solid var(--cp-line);
      background: none;
    }

    .cp-header-inner,
    .cp-footer-inner {
      min-height: 0;
      padding: 0 0 4mm;
    }

    .cp-header-logo,
    .cp-footer-logo {
      flex: none;
      width: 45mm;
      filter: brightness(0);
    }

    /* Headings: solid black instead of gradient text */
    h1,
    h2,
    h3,
    h4,
    .cp-toggle-title {
      background: none;
      color: #000;
      -webkit-text-fill-color: currentColor;
      break-after: avoid;
    }

    p,
    li {
      orphans: 3;
      widows: 3;
    }

    /* Sections without the screen spacing; page margins do the work */
    .cp-section,
    .cp-page-title {
      padding: 6mm 0;
      background: none;
    }

    .cp-row {
      max-width: none;
      padding: 0;
    }

    .cp-page-title h1 {
      font-size: 24pt;
    }

    /* Legal pages */
    .cp-legal {
      display: block;
    }

    .cp-legal-body {
      max-width: none;
      color: #222;
    }

    .cp-legal-body h2 {
      font-size: 16pt;
    }

    .cp-legal-body h3 {
      margin-top: 5mm;
      font-size: 13pt;
    }

    .cp-legal-section:not(:last-child) {
      margin-bottom: 8mm;
    }

    .cp-card,
    .cp-toggle,
    .cp-legal-card {
      border: 1px solid var(--cp-line);
      background: none;
      box-shadow: none;
      break-inside: avoid;
    }

    /* Links: plain underlined text; external targets written out */
    a,
    .cp-legal-body p a,
    .cp-toggle-content a {
      color: inherit;
      background: none;
      text-decoration: underline;
    }

    .cp-legal-body a[href^="http"]::after,
    .cp-toggle-content a[href^="http"]::after {
      content: " (" attr(href) ")";
    }

    /* AGB accordions: every section printed, open */
    .cp-toggle {
      break-inside: auto;
    }

    .cp-toggle:not(:last-child) {
      margin-bottom: 8mm;
    }

    .cp-toggle::details-content {
      content-visibility: visible;
    }

    .cp-toggle summary {
      padding: 4mm;
    }

    .cp-toggle summary::after {
      content: none;
    }

    .cp-toggle-content {
      display: block;
      padding: 4mm;
      border-top-color: var(--cp-line);
    }

    /* Start page and 404: readable, without effects */
    .cp-hero {
      min-height: 0;
      margin-top: 0;
    }

    .cp-hero-content {
      padding: 6mm 0;
    }

    .cp-hero-logo {
      width: 90mm;
    }

    .cp-hero-logo-word {
      fill: #000;
    }

    .cp-type-char,
    [data-reveal] {
      opacity: 1;
    }

    .cp-contact,
    .cp-error {
      min-height: 0;
      background: none;
    }

    .cp-footer {
      margin-top: 8mm;
      border-top: 1px solid var(--cp-line);
    }

    .cp-footer-inner {
      padding-top: 4mm;
    }
  }
}
