/* ==========================================================================
   File:     assets/css/style.css
   Project:  dienstleistung.speidel.it – one-pager
   Author:   Sascha Speidel
   Created:  2026-11-10
   --------------------------------------------------------------------------
   Mobile-first stylesheet. Structure:
     1. Fonts (local WOFF2, IBM Plex – SIL OFL 1.1)
     2. Design tokens (custom properties)
     3. Base / reset
     4. Utilities (container, visually-hidden, icons, buttons)
     5. Header & navigation
    5a. Notice bar (configurable, inc/notice-config.php)
     6. Hero (incl. example stories)
     7. Sections (shared), services, about, contact
     8. Footer & mobile quick actions
     9. Legal dialogs (+ no-JS :target fallback)
    9b. Legal sub pages (/agb/, /widerruf/)
    9c. Order form (/internal/auftragsformular.php, password protected)
    9d. Price list (/internal/preisliste.php, password protected)
    9e. Internal pages: login, overview, print price calculator (/internal/)
    10. Scroll reveal & reduced motion
    11. Breakpoints: 30em (480px), 48em (768px), 64em (1024px)
    12. Print
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. Fonts
   IBM Plex Sans / IBM Plex Mono, Latin subset, served locally.
   Family names are local aliases ("Site Sans" / "Site Mono"), so the
   OFL "Reserved Font Name" is not reused for the subsetted files.
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Site Sans";
  src: url("../fonts/ibm-plex-sans-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Site Sans";
  src: url("../fonts/ibm-plex-sans-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Site Sans";
  src: url("../fonts/ibm-plex-sans-latin-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Site Mono";
  src: url("../fonts/ibm-plex-mono-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Site Mono";
  src: url("../fonts/ibm-plex-mono-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* Metric-matched fallbacks: reduce text reflow (CLS) while the web fonts load.
   Values approximate IBM Plex vertical metrics (ascender 1025, descender 275). */
@font-face {
  font-family: "Site Sans Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Liberation Sans");
  ascent-override: 102.5%;
  descent-override: 27.5%;
  line-gap-override: 0%;
  size-adjust: 101%;
}
@font-face {
  font-family: "Site Mono Fallback";
  src: local("Courier New"), local("Liberation Mono");
  ascent-override: 102.5%;
  descent-override: 27.5%;
  line-gap-override: 0%;
  size-adjust: 100%;
}


/* --------------------------------------------------------------------------
   2. Design tokens
   Accent derived from the logo blue (#21a8f4, hue ≈ 202°), lightened for
   text use on dark surfaces. All text pairs meet WCAG AA (most AAA):
     --text  on --bg       16.3 : 1
     --muted on --surface   6.1 : 1
     --accent on --bg       8.9 : 1
     --bg on --accent (buttons) 8.9 : 1
   -------------------------------------------------------------------------- */
:root {
  /* Colours */
  --bg: #0b0f14;
  --surface: #111821;
  --surface-2: #16202b;
  --line: #223040;
  --line-strong: #2f4257;
  --text: #e6edf3;
  --muted: #8b98a5;
  --accent: #5ab9f7;          /* text, links, primary buttons */
  --accent-logo: #21a8f4;     /* exact logo blue: lines, markers */
  --accent-ink: #0b0f14;      /* text on accent background */
  --accent-soft: rgba(90, 185, 247, 0.1);
  --grid-dot: rgba(139, 152, 165, 0.22);
  --backdrop: rgba(5, 8, 12, 0.78);

  /* Typography */
  --font-sans: "Site Sans", "Site Sans Fallback", system-ui, sans-serif;
  --font-mono: "Site Mono", "Site Mono Fallback", ui-monospace, monospace;
  --fs-xs: 0.8125rem;   /* 13px – mono labels */
  --fs-sm: 0.9375rem;   /* 15px */
  --fs-base: 1.0625rem; /* 17px – body */
  --fs-lg: 1.1875rem;   /* 19px – lead */
  --fs-h3: 1.375rem;
  --fs-h2: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
  --fs-h1: clamp(2.25rem, 1.3rem + 4.4vw, 4.25rem);

  /* Layout */
  --container: 74rem;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --header-h: 4rem;
  --quick-h: 4.5rem;          /* height of the mobile quick-action bar */
  --radius: 6px;
  --radius-sm: 4px;
  --radius-lg: 8px;
  --section-space: clamp(4rem, 2.5rem + 6vw, 7.5rem);

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 0.5s;

  color-scheme: dark;
}


/* --------------------------------------------------------------------------
   3. Base / reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Keep anchor targets clear of the sticky header */
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

/* Smooth anchor scrolling only for users who did not ask for less motion */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Room for the fixed quick-action bar on small screens */
  padding-bottom: calc(var(--quick-h) + env(safe-area-inset-bottom, 0px));
}

/* Scroll lock while a modal dialog is open (set by main.js) */
html.is-scroll-locked {
  overflow: hidden;
}
html.is-scroll-locked body {
  padding-right: var(--scrollbar-width, 0px);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p,
ul,
ol,
dl,
figure {
  margin: 0;
}

p {
  text-wrap: pretty;
}

img,
svg,
picture {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

/* One clear, consistent focus indicator for every interactive element */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

main:focus {
  outline: none;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}


/* --------------------------------------------------------------------------
   4. Utilities
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Skip link: hidden until focused */
.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  border-radius: var(--radius);
  transform: translateY(-150%);
}
.skip-link:focus {
  transform: none;
}

/* The sprite only holds <symbol>s and must not take up space */
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Inline SVG icon referencing the sprite */
.icon {
  flex: none;
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Mono label style used for "// section" markers and indices */
.section-label,
.eyebrow,
.service-index,
.group-key,
.section-meta,
.contact-label,
.brand-tag,
.fact-list dt,
figcaption {
  font-family: var(--font-mono);
}

/* Buttons ----------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3rem;            /* ≥ 48px touch target */
  padding: 0.7rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: 600 var(--fs-sm) / 1.2 var(--font-sans);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover {
  background: #7cc8fa;
}

.btn-secondary {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-sm {
  min-height: 2.5rem;
  padding: 0.5rem 0.95rem;
}


/* --------------------------------------------------------------------------
   5. Header & navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 15, 20, 0.94);
  border-bottom: 1px solid var(--line);
}

/* Slight translucency only where backdrop blur is supported */
@supports (backdrop-filter: blur(8px)) {
  .site-header {
    background: rgba(11, 15, 20, 0.82);
    backdrop-filter: blur(8px);
  }
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding-block: 0.5rem;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.brand-tag {
  font-size: 0.6875rem;
  color: var(--muted);
}

/* No-JS default on small screens: links shown as a compact row
   below the brand, so navigation always works. */
.site-nav {
  display: flex;
  align-items: center;
  width: 100%;
  border-top: 1px solid var(--line);
}

.nav-list {
  display: flex;
  gap: 1.25rem;
  padding: 0;
  list-style: none;
}

.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--text);
  font-size: var(--fs-sm);
  text-decoration: none;
}

.nav-list a:hover {
  color: var(--accent);
}

.nav-cta {
  display: none;
}

/* Burger button – only with JS (see .js rules below) */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  min-width: 2.75rem;
  padding: 0.4rem 0.75rem;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  font: 500 var(--fs-xs) / 1 var(--font-mono);
  cursor: pointer;
}

.nav-toggle:hover {
  border-color: var(--accent);
}

/* JS-enhanced mobile menu: collapsed panel opened by the burger */
.js .nav-toggle {
  display: inline-flex;
}

.js .site-nav {
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  padding-block: 0.5rem 1rem;
}

.js .site-nav.is-open {
  display: flex;
}

.js .nav-list {
  flex-direction: column;
  gap: 0;
}

.js .nav-list a {
  width: 100%;
  min-height: 3rem;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-base);
}

/* In the burger panel, the contact button replaces the plain "Kontakt" link */
.js .nav-list-contact {
  display: none;
}

.js .nav-cta {
  display: inline-flex;
  min-height: 3rem;
}


/* --------------------------------------------------------------------------
   5a. Notice bar (inc/notice.php, configured in inc/notice-config.php)
   Solid bar above the sticky header. It scrolls away with the page, so the
   header and scroll-padding-top stay unchanged. Contrast (text on bar):
     info:    --accent-ink on --accent       8.9 : 1
     warning: --accent-ink on #f5b544      10.6 : 1
   -------------------------------------------------------------------------- */
.site-notice {
  --notice-bg: var(--accent);
  --notice-ink: var(--accent-ink);
  background: var(--notice-bg);
  color: var(--notice-ink);
  font-size: var(--fs-sm);
  line-height: 1.45;
}

.site-notice--warning {
  --notice-bg: #f5b544;
}

.site-notice-inner {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding-block: 0.65rem;
}

.site-notice-icon {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-notice-text {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.site-notice-text strong {
  font-weight: 600;
}

/* Close button: only revealed by main.js (needs sessionStorage) */
.site-notice-close {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: -0.4rem -0.5rem -0.4rem 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.site-notice-close[hidden] {
  display: none;
}
.site-notice-close:hover {
  background: rgba(11, 15, 20, 0.12);
}
.site-notice-close:focus-visible {
  outline: 2px solid var(--notice-ink);
  outline-offset: 1px;
}
.site-notice-close svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
}

@media (min-width: 48em) {
  .site-notice-inner {
    align-items: center;
  }
  .site-notice-icon {
    margin-top: 0;
  }
}


/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(3rem, 2rem + 6vw, 7rem) clamp(3.5rem, 2rem + 6vw, 7rem);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

/* Subtle dot grid, fading out towards the bottom-left */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at center, var(--grid-dot) 1px, transparent 1.4px);
  background-size: 24px 24px;
  background-position: -12px -12px;
  -webkit-mask-image: linear-gradient(200deg, #000 15%, transparent 75%);
  mask-image: linear-gradient(200deg, #000 15%, transparent 75%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  gap: 3rem;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  color: var(--accent);
  font-size: var(--fs-xs);
}

/* Small square marker in logo blue */
.eyebrow-mark {
  width: 0.5rem;
  height: 0.5rem;
  background: var(--accent-logo);
  border-radius: 1px;
}

.hero h1 {
  max-width: 14ch;
  font-size: var(--fs-h1);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.lead {
  max-width: 38rem;
  margin-top: 1.5rem;
  color: #c3ced8;
  font-size: var(--fs-lg);
  line-height: 1.6;
}

/* Phones: "Anrufen" spans the full width, E-Mail and WhatsApp share the
   row below (1 + 2 grid). From 48em the buttons sit in one row. */
.cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 2rem;
}

.cta-row .btn-primary {
  grid-column: 1 / -1;
}

/* Long label part ("schreiben"): hidden visually on phones only */
.cta-row .cta-label-extra {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Narrow half-width buttons: a bit less side padding */
.cta-row .btn-secondary {
  padding-inline: 0.75rem;
}

/* On phones both CTAs fill their line for equal, thumb-friendly targets */
.cta-row .btn {
  flex: 1 1 12rem;
}

.hero-note {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.hero-note .icon {
  margin-top: 0.1em;
  color: var(--accent);
}

/* Example stories ("vorher / nachher") ------------------------------------ */
/* Hidden on phones, where it would push the content down */
@media (max-width: 47.99em) {
  .stories {
    display: none;
  }
}

.stories {
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.stories-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2.5rem;
  padding: 0.3rem 0.5rem 0.3rem 1.25rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font: 400 0.75rem / 1.4 var(--font-mono);
}

.stories-toggle {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.stories-toggle:hover {
  color: var(--text);
}

.stories-toggle[hidden] {
  display: none;
}

.stories-toggle .icon-play,
.stories-toggle.is-paused .icon-pause {
  display: none;
}

.stories-toggle.is-paused .icon-play {
  display: block;
}

/* All stories share one grid cell: the card is as tall as the longest
   story, so switching never shifts the layout */
.stories-track {
  display: grid;
  padding: 1.5rem 1.25rem 1.25rem;
}

.story {
  grid-area: 1 / 1;
  visibility: hidden;
  opacity: 0;
}

.story.is-active {
  visibility: visible;
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .story {
    transition: opacity 0.6s var(--ease), visibility 0.6s;
  }
}

.story-label {
  color: var(--muted);
  font: 400 var(--fs-xs) / 1.4 var(--font-mono);
}

.story-problem {
  margin-top: 0.35rem;
  color: var(--text);
  font-size: var(--fs-lg);
  line-height: 1.4;
}

.story-arrow {
  display: block;
  margin: 0.9rem 0 0.7rem;
  color: var(--accent);
}

.story-solution {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.35rem;
  color: var(--text);
  font-weight: 500;
  line-height: 1.45;
}

.story-solution .icon {
  flex: none;
  margin-top: 0.15em;
  color: var(--accent);
}

.story-tag {
  margin-top: 1.1rem;
  color: var(--accent);
  font: 400 var(--fs-xs) / 1.4 var(--font-mono);
}

/* Dots: 24px hit area (WCAG target size), small visible dot */
.stories-dots {
  display: flex;
  gap: 0.15rem;
  padding: 0 0.75rem 0.75rem;
}

.stories-dots[hidden] {
  display: none;
}

.stories-dot {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.stories-dot::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border: 1px solid var(--muted);
  border-radius: 50%;
}

.stories-dot[aria-current="true"]::before {
  border-color: var(--accent);
  background: var(--accent);
}

.stories-dot:focus-visible,
.stories-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}


/* --------------------------------------------------------------------------
   7. Sections (shared)
   -------------------------------------------------------------------------- */
.section {
  padding-block: var(--section-space);
  border-bottom: 1px solid var(--line);
}

.section-alt {
  background: var(--surface);
}

.section-head {
  display: grid;
  gap: 1rem;
  margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem);
}

.section-meta {
  color: var(--muted);
  font-size: var(--fs-xs);
}

.section-num {
  color: var(--text);
}

.section-label {
  margin-left: 0.75rem;
  color: var(--accent);
  font-size: var(--fs-xs);
}

.section-head h2 {
  max-width: 20ch;
  font-size: var(--fs-h2);
}

.section-intro {
  max-width: 34rem;
  color: var(--muted);
}

/* Services --------------------------------------------------------------- */
.service-group + .service-group {
  margin-top: clamp(3.5rem, 2.5rem + 4vw, 6rem);
}

.group-head {
  position: relative;
  margin-bottom: 1.5rem;
  padding-left: 1rem;
  border-left: 2px solid var(--accent-logo);
}

.group-key {
  color: var(--accent);
  font-size: var(--fs-xs);
}

.group-head h3 {
  margin-top: 0.25rem;
  font-size: var(--fs-h3);
}

.group-head p:last-child {
  max-width: 26rem;
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: var(--fs-sm);
}

/* A) IT services as a documentation-style list */
.service-list {
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.service-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.service-index {
  color: var(--muted);
  font-size: var(--fs-xs);
}

.service-row .service-index {
  grid-column: 1 / -1;
}

.service-icon {
  width: 1.75rem;
  height: 1.75rem;
  color: var(--accent);
}

.service-body h4 {
  font-size: 1.125rem;
  font-weight: 600;
}

.service-body > p:not(.service-example),
.tile > p:not(.service-example) {
  margin-top: 0.4rem;
  color: #c3ced8;
}

.service-example {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.service-example span {
  margin-right: 0.35rem;
  padding: 0.05rem 0.4rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* B) Smart home – main focus: highlighted panel, 2×2 grid, tech stack bar */
.smarthome-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent-logo);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.smarthome-grid {
  display: grid;
  padding: 0;
  list-style: none;
}

.sh-cell {
  padding: 1.5rem;
}

.sh-cell + .sh-cell {
  border-top: 1px solid var(--line);
}

.sh-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  color: var(--accent);
}

.sh-title .icon {
  width: 1.75rem;
  height: 1.75rem;
}

.sh-cell h4 {
  font-size: 1.125rem;
}

.sh-cell > p:not(.service-example) {
  margin-top: 0.4rem;
  color: #c3ced8;
}

.stack-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--line);
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}

.stack-label {
  color: var(--muted);
}

.stack-tag {
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
}

/* C) Content creation as spec-style tiles in a shared bordered grid */
.tile-grid {
  display: grid;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.tile {
  padding: 1.5rem;
  background: var(--surface);
}

.tile + .tile {
  border-top: 1px solid var(--line);
}

.tile-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  color: var(--accent);
}

.tile-top .icon {
  width: 1.75rem;
  height: 1.75rem;
}

.tile h4 {
  font-size: 1.125rem;
}

/* In narrow tiles the "z. B." tag sits on its own line for a clean wrap */
.tile .service-example,
.sh-cell .service-example {
  padding-top: 0.75rem;
  border-top: 1px dashed var(--line);
}

.tile .service-example span,
.sh-cell .service-example span {
  display: block;
  width: fit-content;
  margin-bottom: 0.35rem;
}

/* About ------------------------------------------------------------------ */
.about-grid {
  display: grid;
  gap: 2rem;
}

.about-head {
  margin-bottom: 0;
}

.about-photo {
  max-width: 18rem;
}

.about-photo img {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}

.about-photo figcaption {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.about-text {
  max-width: 40rem;
}

.about-text > p + p {
  margin-top: 1rem;
}

.fact-list {
  display: grid;
  margin-top: 2rem;
  border-top: 1px solid var(--line-strong);
}

.fact-list > div {
  display: grid;
  gap: 0.15rem;
  padding-block: 0.8rem;
  border-bottom: 1px solid var(--line-strong);
}

.fact-list dt {
  color: var(--accent);
  font-size: var(--fs-xs);
}

.fact-list dd {
  margin: 0;
  font-size: var(--fs-sm);
}

/* Steps ("So läuft's ab") in the contact section ------------------------ */
.steps {
  display: grid;
  gap: 1rem;
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}

.steps li {
  position: relative;
  padding: 1.1rem 1.25rem 1.2rem 3.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.step-num {
  position: absolute;
  top: 1.05rem;
  left: 1.1rem;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--accent-logo);
  border-radius: 50%;
  color: var(--accent);
  font: 500 var(--fs-xs) / 1 var(--font-mono);
}

.steps h3 {
  margin-bottom: 0.3rem;
  font-size: 1.0625rem;
}

.steps p {
  color: var(--muted);
  font-size: var(--fs-sm);
}

@media (min-width: 48em) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Contact ---------------------------------------------------------------- */
.contact-grid {
  display: grid;
  gap: 1rem;
  padding: 0;
  list-style: none;
}

.contact-grid > li {
  display: flex;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, background-color 0.15s;
}

.contact-card:hover {
  border-color: var(--accent);
  background: var(--surface-2);
}

.contact-card-primary {
  border-color: var(--accent-logo);
}

.contact-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  font-size: var(--fs-xs);
}

.contact-value {
  font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.625rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

/* Long e-mail address must never overflow at 320px */
.contact-value-mail {
  overflow-wrap: anywhere;
  font-size: clamp(1.0625rem, 0.95rem + 0.6vw, 1.375rem);
}

.contact-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.5rem;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.contact-card:hover .contact-action {
  color: var(--accent);
}

/* WhatsApp card: spans the full row below phone / e-mail */
.contact-grid-wide {
  grid-column: 1 / -1;
}

.contact-card-wide .contact-value {
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
}

/* Short privacy hint inside a contact card */
.contact-hint {
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.contact-note {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.contact-note .icon {
  margin-top: 0.1em;
  color: var(--accent);
}


/* --------------------------------------------------------------------------
   8. Footer & mobile quick actions
   -------------------------------------------------------------------------- */
.site-footer {
  padding-block: 2rem;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.footer-brand img {
  width: 1.5rem;
  height: 1.5rem;
}

/* Logo pictures inside flex rows must never be squeezed */
.brand picture,
.footer-brand picture {
  flex: none;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  padding: 0;
  list-style: none;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--text);
}

.footer-nav a:hover {
  color: var(--accent);
}

/* Fixed bar at the bottom of small screens: call / e-mail with the thumb */
.quick-actions {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0.6rem var(--gutter) calc(0.6rem + env(safe-area-inset-bottom, 0px));
  background: rgba(17, 24, 33, 0.96);
  border-top: 1px solid var(--line);
}

.quick-actions .btn {
  min-height: 3.25rem;
}


/* --------------------------------------------------------------------------
   9. Legal dialogs
   -------------------------------------------------------------------------- */
.legal-dialog {
  width: min(46rem, calc(100% - 1.5rem));
  max-width: none;
  max-height: calc(100dvh - 1.5rem);
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  color: var(--text);
  overflow: hidden;
}

.legal-dialog[open] {
  display: flex;
}

/* The dialog box itself is not a control; focus is shown on its contents */
.legal-dialog:focus,
.legal-dialog:focus-visible {
  outline: none;
}

.legal-dialog::backdrop {
  background: var(--backdrop);
}

.legal-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: inherit;
}

.legal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--line);
}

.legal-head .section-label {
  margin: 0 0 0.35rem;
}

.legal-head h2 {
  font-size: 1.5rem;
}

.legal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
}

.legal-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.legal-body {
  padding: 1.25rem 1.25rem 1.75rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  font-size: var(--fs-sm);
  line-height: 1.65;
}

.legal-body h3 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.0625rem;
}

.legal-body h3:first-child {
  margin-top: 0;
}

.legal-body p + p,
.legal-body ul + p,
.legal-body p + ul {
  margin-top: 0.75rem;
}

.legal-body ul {
  padding-left: 1.25rem;
}

.legal-body li + li {
  margin-top: 0.25rem;
}

/* Highlighted notice, e.g. the right to object (Art. 21 Abs. 4 DSGVO) */
.legal-notice {
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--accent-logo);
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.legal-notice p + p {
  margin-top: 0.5rem;
}

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

.legal-meta {
  margin-top: 1.5rem;
  color: var(--muted);
}

/* The "back to top" link is only needed in the no-JS fallback */
.legal-back {
  display: none;
}

/* No-JS fallback: a targeted dialog (#impressum / #datenschutz) is shown
   as a normal block at the end of the page. */
.no-js .legal-dialog:target {
  position: static;
  display: block;
  width: auto;
  max-width: var(--container);
  max-height: none;
  margin: 0 auto 2rem;
  border-radius: 0;
  border-inline: 0;
}

.no-js .legal-dialog:target .legal-close {
  display: none;
}

.no-js .legal-dialog:target .legal-body {
  overflow: visible;
}

.no-js .legal-dialog:target .legal-back {
  display: block;
  margin-top: 1.5rem;
}


/* --------------------------------------------------------------------------
   9b. Legal sub pages (/agb/, /widerruf/)
   Documentation-style layout: sticky table of contents + text column.
   -------------------------------------------------------------------------- */
/* Sub pages have no quick-action bar, so no extra bottom padding */
body.page-legal {
  padding-bottom: 0;
}

/* Compact header navigation: back link + contact button (no burger needed) */
.subpage-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.subpage-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding-inline: 0.25rem;
  color: var(--text);
  font-size: var(--fs-sm);
  text-decoration: none;
}

.subpage-back:hover {
  color: var(--accent);
}

/* Sub page header always stays on one line */
.page-legal .header-inner {
  flex-wrap: nowrap;
}

/* On small phones the back link is hidden to make room for the brand
   tagline; the brand itself already links to the start page */
@media (max-width: 29.99em) {
  .subpage-back {
    display: none;
  }

  .page-legal .brand-tag {
    white-space: nowrap;
  }

  .page-legal .subpage-nav .btn-sm {
    padding-inline: 0.75rem;
  }
}

.doc-page {
  padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem) var(--section-space);
}

.doc-eyebrow {
  display: block;
  margin: 0 0 1rem;
}

.doc-head {
  max-width: 48rem;
  margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}

.doc-head h1 {
  font-size: var(--fs-h2);
  letter-spacing: -0.02em;
}

.doc-address,
.doc-source {
  margin-top: 1rem;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.print-button {
  cursor: pointer;
}

/* The print button only works with JS; main.js removes [hidden] */
.print-button[hidden] {
  display: none;
}

.doc-layout {
  display: grid;
  gap: 2rem;
}

/* Table of contents: collapsible on phones, sticky column on desktop */
.doc-toc details {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.doc-toc summary {
  padding: 0.85rem 1rem;
  color: var(--accent);
  font: 500 var(--fs-xs) / 1.4 var(--font-mono);
  cursor: pointer;
}

.doc-toc ol {
  margin: 0;
  padding: 0 0.5rem 0.75rem;
  list-style: none;
}

.doc-toc a {
  display: flex;
  gap: 0.6rem;
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.35;
  text-decoration: none;
}

.doc-toc a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.para-num {
  flex: none;
  min-width: 2.6em;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.9em;
  font-weight: 500;
}

/* Text column */
.doc {
  max-width: 48rem;
  min-width: 0;
}

.doc-section {
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--line);
}

.doc > .doc-section:first-child {
  margin-top: 0;
}

.doc-intro {
  padding-bottom: 2rem;
}

.doc-intro + .doc-section {
  margin-top: 0;
}

.doc h2 {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: 1rem;
  font-size: 1.375rem;
}

.doc-single h2 {
  display: block;
}

/* Second heading inside one section needs space above it */
.doc-single h2:not(:first-child) {
  margin-top: 2.25rem;
}

.doc h3 {
  margin: 1.75rem 0 0.75rem;
  font-size: 1.125rem;
}

/* "#" anchor next to each § heading, visible on hover/focus */
.heading-anchor {
  margin-left: 0.25rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8em;
  font-weight: 400;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.15s;
}

.doc h2:hover .heading-anchor,
.heading-anchor:focus-visible {
  opacity: 1;
}

.doc p,
.doc li {
  color: #c3ced8;
}

.doc strong {
  color: var(--text);
  font-weight: 600;
}

.doc p + p,
.doc p + ol,
.doc p + ul,
.doc ol + p,
.doc ul + p {
  margin-top: 0.9rem;
}

.doc ol,
.doc ul {
  padding-left: 1.5rem;
}

.doc li + li {
  margin-top: 0.6rem;
}

.doc li::marker {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.doc ol ol {
  margin-top: 0.6rem;
}

.doc-callout {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 1.5rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--accent-logo);
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.doc-callout .icon {
  margin-top: 0.15em;
  color: var(--accent);
}

/* Withdrawal form: framed like a form sheet */
.withdrawal-form {
  margin-top: 1rem;
  padding: 1.25rem 1.25rem 1.25rem 2.5rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
}

.doc .doc-stand {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}

@media (min-width: 64em) {
  .doc-layout {
    grid-template-columns: 17rem minmax(0, 1fr);
    column-gap: 4rem;
    align-items: start;
  }

  .doc-toc {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
    max-height: calc(100vh - var(--header-h) - 3rem);
    overflow-y: auto;
  }
}


/* --------------------------------------------------------------------------
   9c. Order form (/internal/auftragsformular.php, password protected)
   On screen a dark "sheet" with fillable fields; in print one A4 page.
   -------------------------------------------------------------------------- */
.order-screen {
  max-width: 48rem;
  margin-bottom: 2rem;
}

.order-screen-note {
  color: var(--muted);
  font-size: var(--fs-sm);
}

.order-sheet {
  max-width: 52rem;
  padding: clamp(1.25rem, 0.75rem + 2.5vw, 2.5rem);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  font-size: var(--fs-sm);
}

.order-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line-strong);
}

.order-logo img,
img.order-logo {
  display: block;
  width: 7.5rem;
  height: auto;
}

.order-logo-print {
  display: none !important;
}

.order-provider {
  flex: 1 1 18rem;
}

.order-provider h1 {
  margin-bottom: 0.35rem;
  font-size: var(--fs-h3);
}

.order-provider p {
  color: var(--muted);
  font-size: var(--fs-xs);
  line-height: 1.5;
}

.order-provider strong {
  color: var(--text);
  font-weight: 600;
}

.order-meta {
  display: grid;
  gap: 0.5rem 2rem;
  margin-top: 1rem;
}

.order-block {
  min-width: 0;
  margin: 1.25rem 0 0;
  padding: 0;
  border: 0;
}

.order-block legend,
.order-legend {
  display: block;
  width: 100%;
  margin-bottom: 0.6rem;
  padding: 0 0 0.3rem;
  border-bottom: 1px solid var(--line);
  color: var(--accent);
  font: 500 var(--fs-xs) / 1.4 var(--font-mono);
  letter-spacing: 0.02em;
}

/* Label + line: the input looks like a line to write on */
.field {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.6rem;
  margin-top: 0.45rem;
}

.field label {
  flex: none;
  max-width: 100%;
  color: var(--muted);
}

.field input,
.check-amount .amount {
  flex: 1 1 10rem;
  min-width: 0;
  height: 1.9rem;
  padding: 0 0.35rem;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.field-stack {
  display: block;
}

.field-stack label {
  display: block;
  margin-bottom: 0.25rem;
}

/* Multi-line field drawn as ruled lines */
.field textarea {
  --rule: 1.9rem;
  display: block;
  width: 100%;
  min-height: calc(var(--rule) * 4 + 2px);
  padding: 0 0.35rem;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(var(--rule) - 1px),
    var(--line-strong) calc(var(--rule) - 1px),
    var(--line-strong) var(--rule)
  );
  color: var(--text);
  font: inherit;
  line-height: var(--rule);
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.check-amount .amount:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-bottom-color: var(--accent);
}

.field-row {
  display: grid;
  gap: 0 2rem;
}

/* Checkboxes: clearly visible square boxes, on screen and on paper */
.check-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  margin-top: 0.6rem;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.45rem;
}

.check-group .check {
  margin-top: 0;
}

.check input[type="checkbox"] {
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0.2em 0 0;
  border: 1.5px solid var(--muted);
  border-radius: 2px;
  background: transparent center / 85% no-repeat;
  appearance: none;
  cursor: pointer;
}

.check input[type="checkbox"]:checked {
  border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='%235ab9f7' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.check input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.check label {
  cursor: pointer;
}

.check-amount {
  flex-wrap: wrap;
  align-items: baseline;
}

.check-amount input[type="checkbox"] {
  align-self: flex-start;
}

.check-amount .amount {
  flex: 0 0 6rem;
  height: 1.6rem;
  text-align: right;
}

.check-note {
  flex-basis: 100%;
  padding-left: 1.55rem;
  color: var(--muted);
  font-size: var(--fs-xs);
}

/* A label followed by several inline checkboxes (rates, travel zones) */
.rate-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1.25rem;
  margin-top: 0.55rem;
}

.rate-row .check {
  margin-top: 0;
}

.rate-row .check-amount {
  flex: none;
}

.rate-label {
  flex: none;
  color: var(--text);
  font-weight: 500;
}

p.check-note {
  margin-top: 0.2rem;
  padding-left: 0;
}

/* Phones: a long label stays next to its box, the amount line wraps below */
@media (max-width: 29.99em) {
  .order-block > .check-amount > label {
    flex: 1 1 calc(100% - 2.2rem);
    min-width: 0;
  }

  .order-block > .check-amount > .amount {
    margin-left: 1.55rem;
  }
}

.order-small {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: var(--fs-xs);
}

/* Section 5: framed and highlighted */
.order-consent {
  padding: 0.75rem 1rem 0.85rem;
  border: 1px solid var(--accent-logo);
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.order-consent legend {
  float: left;
  border-bottom: 0;
  margin-bottom: 0;
}

.order-consent legend + * {
  clear: both;
}

.order-consent .check label {
  color: var(--text);
}

.sign-grid {
  display: grid;
  gap: 1rem 2.5rem;
}

.sign-line {
  height: 2.5rem;
  border-bottom: 1px solid var(--line-strong);
}

.sign-col p,
.sign-col label {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: var(--fs-xs);
}

/* Pre-filled "Ort, Datum" of the provider: text sits on the line */
.sign-input {
  display: block;
  width: 100%;
  padding: 0.9rem 0.35rem 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.sign-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.order-foot {
  margin-top: 1.5rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--fs-xs);
}

@media (min-width: 40em) {
  .order-meta,
  .field-row,
  .sign-grid {
    grid-template-columns: 1fr 1fr;
  }
}


/* Order form, screen only: roomier layout with checkbox tiles.
   Wrapped in @media screen so the print layout (section 12) stays untouched. */
@media screen {
  .order-sheet {
    font-size: var(--fs-base);
  }

  .order-block {
    margin-top: 2.25rem;
  }

  .order-block legend,
  .order-legend {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
  }

  .field {
    margin-top: 0.85rem;
  }

  .field input,
  .check-amount .amount {
    height: 2.4rem;
  }

  .field textarea {
    --rule: 2.2rem;
  }

  .check input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    margin-top: 0.15em;
  }

  /* Option groups (customer type, services, backup, rates, travel) as tiles */
  .check-group,
  .rate-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
    align-items: stretch;
    gap: 0.6rem;
    margin-top: 1rem;
  }

  /* Rows with a leading label: flex, so two tiles share the full width */
  .rate-row {
    display: flex;
    flex-wrap: wrap;
    margin-top: 1.25rem;
  }

  .rate-row .check {
    flex: 1 1 13rem;
  }

  .rate-row .check-amount {
    flex-grow: 0;
  }

  .rate-label {
    flex: 0 0 100%;
    margin-bottom: -0.1rem;
    color: var(--muted);
    font-size: var(--fs-sm);
  }

  .check-group .check,
  .rate-row .check {
    align-items: center;
    margin: 0;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
    font-size: var(--fs-sm);
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
  }

  .check-group .check:hover,
  .rate-row .check:hover {
    border-color: var(--line-strong);
  }

  .check-group .check:has(input:checked),
  .rate-row .check:has(input:checked) {
    border-color: var(--accent-logo);
    background: var(--accent-soft);
  }

  .check-group .check input[type="checkbox"],
  .rate-row .check input[type="checkbox"] {
    margin-top: 0;
  }

  .check-group .check label,
  .rate-row .check label {
    flex: 1 1 auto;
    line-height: 1.35;
  }

  /* "über 50 km" tile: amount field inside the tile */
  .rate-row .check-amount {
    flex-wrap: nowrap;
    align-items: center;
  }

  .rate-row .check-amount input[type="checkbox"] {
    align-self: center;
  }

  .rate-row .check-amount label {
    flex: none;
  }

  .rate-row .check-amount .amount {
    flex: 1 1 3rem;
    height: 1.9rem;
  }

  p.check-note {
    margin-top: 0.6rem;
  }

  /* Single checkboxes (fixed price, domain, deposit, contract basics) */
  .order-block > .check {
    margin-top: 0.85rem;
  }

  .order-block > .check-amount {
    align-items: center;
  }

  .order-block > .check-amount > input[type="checkbox"] {
    align-self: center;
    margin-top: 0;
  }

  .order-block > .check + .check {
    margin-top: 0.7rem;
  }

  .order-small {
    margin-top: 0.85rem;
  }

  .order-consent {
    margin-top: 2.25rem;
    padding: 1.1rem 1.25rem 1.25rem;
  }

  .sign-grid {
    margin-top: 0.5rem;
  }

  .sign-line {
    height: 3rem;
  }

  .order-foot {
    margin-top: 2.25rem;
  }
}


/* --------------------------------------------------------------------------
   9d. Price list (/internal/preisliste.php, password protected) – reuses the sheet from 9c
   -------------------------------------------------------------------------- */
.price-intro {
  margin-top: 1rem;
  color: var(--muted);
  font-size: var(--fs-xs);
}

.price-block {
  margin-top: 1.75rem;
}

.price-block h2 {
  margin-bottom: 0.6rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--line);
  color: var(--accent);
  font: 500 var(--fs-xs) / 1.4 var(--font-mono);
  letter-spacing: 0.02em;
}

.price-block h3 {
  margin: 1rem 0 0.4rem;
  font-size: var(--fs-sm);
}

.price-block p,
.price-notes {
  color: #c3ced8;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
}

.price-table th {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line-strong);
  color: var(--muted);
  font: 400 var(--fs-xs) / 1.4 var(--font-mono);
  text-align: left;
}

.price-table td {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.price-table th:last-child,
.price-table td:last-child {
  padding-left: 1.5rem;
  text-align: right;
  white-space: nowrap;
}

.price-table td:last-child {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.price-notes {
  margin: 0;
  padding-left: 1.25rem;
}

.price-notes li + li {
  margin-top: 0.3rem;
}

.price-notes strong {
  color: var(--text);
  font-weight: 600;
}

/* Phones: each row becomes a small stacked card (service above, price below) */
@media (max-width: 29.99em) {
  .price-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .price-table tr {
    display: block;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--line);
  }

  .price-table td {
    display: block;
    padding: 0;
    border: 0;
  }

  .price-table td:last-child {
    margin-top: 0.15rem;
    padding-left: 0;
    color: var(--accent);
    text-align: left;
    white-space: normal;
  }
}


/* --------------------------------------------------------------------------
   9e. Internal pages: login, overview, print price calculator (/internal/)
   -------------------------------------------------------------------------- */
.gate {
  max-width: 30rem;
}

.gate h1 {
  font-size: var(--fs-h2);
}

.gate-text {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  color: var(--muted);
}

.gate-text .icon {
  flex: none;
  margin-top: 0.2em;
  color: var(--accent);
}

.gate-form {
  margin-top: 1.5rem;
}

.gate-form label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.gate-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.gate-row input {
  flex: 1 1 12rem;
  min-width: 0;
  min-height: 2.75rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.gate-row input:focus,
.calc-row input[type="number"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.alert-error {
  margin-top: 1rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid #e5484d;
  border-radius: var(--radius);
  background: rgba(229, 72, 77, 0.12);
  color: var(--text);
  font-size: var(--fs-sm);
}

/* Links between internal pages are POST buttons (inc/internal-auth.php) */
.internal-link {
  display: contents;
}

button.subpage-back {
  border: 0;
  background: none;
  font: inherit;
  font-size: var(--fs-sm);
  cursor: pointer;
}

/* Overview /internal/ */
.tool-grid {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
  padding: 0;
  list-style: none;
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.tool-card h2 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.125rem;
}

.tool-card h2 .icon {
  flex: none;
  color: var(--accent);
}

.tool-card p {
  flex: 1;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.tool-meta {
  color: var(--muted);
  font: 400 var(--fs-xs) / 1.4 var(--font-mono);
}

.tool-card .btn {
  align-self: flex-start;
  margin-top: 0.4rem;
}

.tool-key {
  margin-top: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.tool-key h2 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.125rem;
}

.tool-key h2 .icon {
  flex: none;
  color: var(--accent);
}

.tool-key > p {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.tool-key > .tool-key-label {
  margin-top: 1rem;
  color: var(--muted);
  font: 400 var(--fs-xs) / 1.4 var(--font-mono);
}

.tool-key-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.4rem;
}

.tool-key-value {
  flex: 1 1 20rem;
  min-width: 0;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font: 500 var(--fs-sm) / 1.5 var(--font-mono);
  overflow-wrap: anywhere;
  user-select: all;
}

.tool-key-status {
  min-height: 1.4em;
  margin-top: 0.4rem;
  color: var(--accent);
  font: 400 var(--fs-xs) / 1.4 var(--font-mono);
}

@media (min-width: 48em) {
  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.calc-head {
  margin-bottom: 2rem;
}

.calc-grid {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}

.calc-card,
.calc-result {
  padding: 1.1rem 1.25rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.calc-card + .calc-card {
  margin-top: 1rem;
}

.calc-card h2,
.calc-result h2 {
  margin-bottom: 0.6rem;
  color: var(--muted);
  font: 500 var(--fs-xs) / 1.4 var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

.calc-idx {
  margin-right: 0.35rem;
  color: var(--accent);
}

.calc-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 8rem;
  gap: 0.75rem;
  align-items: center;
  padding: 0.6rem 0;
}

.calc-row + .calc-row {
  border-top: 1px solid var(--line);
}

.calc-row[hidden] {
  display: none;
}

.calc-row label {
  font-size: var(--fs-sm);
}

.calc-hint {
  display: block;
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: var(--fs-xs);
}

.calc-row input[type="number"] {
  width: 100%;
  min-height: 2.5rem;
  padding: 0 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: 400 var(--fs-sm) / 1 var(--font-mono);
  text-align: right;
}

/* Switch: a real checkbox (role="switch") drawn as a track with a knob */
.calc-toggle-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.calc-switch {
  position: relative;
  display: inline-block;
  width: 2.75rem;
  height: 1.5rem;
}

.calc-switch input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.calc-switch-track {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg);
  transition: background-color 0.15s, border-color 0.15s;
}

.calc-switch-track::after {
  content: "";
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.15s, background-color 0.15s;
}

.calc-switch input:checked + .calc-switch-track {
  border-color: var(--accent-logo);
  background: var(--accent-soft);
}

.calc-switch input:checked + .calc-switch-track::after {
  background: var(--accent);
  transform: translateX(1.25rem);
}

.calc-switch input:focus-visible + .calc-switch-track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Result panel */
.calc-receipt {
  margin: 0;
  font: 400 var(--fs-sm) / 1.4 var(--font-mono);
}

.calc-receipt-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.3rem 0;
  color: var(--muted);
}

.calc-receipt-line dd {
  margin: 0;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.calc-receipt-line.is-sum {
  margin-top: 0.4rem;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--line-strong);
  color: var(--text);
}

.calc-total {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--accent-logo);
  border-radius: var(--radius);
  background: var(--accent-soft);
  text-align: center;
}

.calc-total-label,
.calc-stat-label {
  color: var(--muted);
  font: 400 var(--fs-xs) / 1.4 var(--font-mono);
}

.calc-total-value {
  margin-top: 0.2rem;
  color: var(--accent);
  font: 600 2rem / 1.2 var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.calc-deposit {
  margin-top: 0.75rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.calc-deposit-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.3rem;
  font-size: var(--fs-sm);
}

.calc-deposit-line + .calc-deposit-line {
  border-top: 1px dashed var(--line);
}

.calc-deposit-line dt {
  color: var(--muted);
}

.calc-deposit-line dd {
  color: var(--text);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.calc-deposit-line:first-child dd {
  color: var(--accent);
  font-weight: 600;
}

.calc-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.calc-stat {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  text-align: center;
}

.calc-stat-value {
  margin-top: 0.15rem;
  color: var(--text);
  font: 500 1.0625rem / 1.3 var(--font-mono);
}

.calc-note,
.calc-foot {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: var(--fs-xs);
}

.calc-foot {
  margin-top: 2rem;
  text-align: center;
}

@media (max-width: 29.99em) {
  .calc-row {
    grid-template-columns: minmax(0, 1fr) 6.5rem;
  }
}

@media (min-width: 56em) {
  .calc-grid {
    grid-template-columns: minmax(0, 1fr) 21rem;
    gap: 1.5rem;
  }

  .calc-result {
    position: sticky;
    top: calc(var(--header-h) + 1.25rem);
  }
}


/* --------------------------------------------------------------------------
   10. Scroll reveal
   Only active when main.js adds .reveal-ready (IntersectionObserver
   available, no reduced-motion preference). Opacity/transform only, so
   no layout shift.
   -------------------------------------------------------------------------- */
.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.reveal-ready .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* --------------------------------------------------------------------------
   11. Breakpoints
   -------------------------------------------------------------------------- */

/* < 360px: very small phones – keep header on one line */
@media (max-width: 22.49em) {
  .brand-tag {
    display: none;
  }
}

/* ≥ 480px: services list with icon column */
@media (min-width: 30em) {
  .service-row {
    grid-template-columns: 4rem auto 1fr;
    gap: 1rem 1.25rem;
    align-items: start;
  }

  .service-row .service-index {
    grid-column: auto;
    padding-top: 0.2rem;
  }

  .fact-list > div {
    grid-template-columns: 9rem 1fr;
    gap: 1rem;
  }
}

/* ≥ 768px: tablet */
@media (min-width: 48em) {
  :root {
    --header-h: 4.5rem;
  }

  /* The quick-action bar is a phone feature only */
  body {
    padding-bottom: 0;
  }

  .quick-actions {
    display: none;
  }

  /* Header: brand left, nav right, single row (with or without JS) */
  .header-inner {
    flex-wrap: nowrap;
  }

  .site-nav,
  .js .site-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.75rem;
    width: auto;
    padding: 0;
    border: 0;
  }

  .js .nav-toggle {
    display: none;
  }

  .nav-list,
  .js .nav-list {
    flex-direction: row;
    gap: 1.75rem;
  }

  .js .nav-list a {
    width: auto;
    min-height: 2.75rem;
    border: 0;
    font-size: var(--fs-sm);
  }

  .nav-list-contact,
  .js .nav-list-contact {
    display: none;
  }

  .nav-cta,
  .js .nav-cta {
    display: inline-flex;
    min-height: 2.5rem;
  }

  .tile-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Smart home: 2×2 grid with inner 1px dividers */
  .smarthome-grid {
    grid-template-columns: 1fr 1fr;
  }

  .sh-cell + .sh-cell {
    border-top: 0;
  }

  .sh-cell:nth-child(even) {
    border-left: 1px solid var(--line);
  }

  .sh-cell:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  /* CTAs return to their natural width next to each other */
  .cta-row {
    display: flex;
    flex-wrap: wrap;
  }

  .cta-row .btn {
    flex: 0 0 auto;
  }

  .cta-row .btn-secondary {
    padding-inline: 1.25rem;
  }

  .cta-row .cta-label-extra {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
  }

  .tile + .tile {
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: minmax(12rem, 16rem) 1fr;
    column-gap: 3rem;
    row-gap: 2.5rem;
  }

  .about-head {
    grid-column: 1 / -1;
  }

  .about-photo {
    max-width: none;
  }

  .legal-head {
    padding: 1.5rem 2rem 1.25rem;
  }

  .legal-body {
    padding: 1.5rem 2rem 2rem;
  }
}

/* ≥ 1024px: desktop – 12-column grid with deliberate asymmetry */
@media (min-width: 64em) {
  .hero-grid {
    grid-template-columns: repeat(12, 1fr);
    align-items: start;
  }

  .hero-copy {
    grid-column: 1 / span 7;
  }

  /* Story card sits lower than the headline – intentional offset */
  .stories {
    grid-column: 9 / -1;
    margin-top: 4.5rem;
  }

  /* Section head: meta in a narrow left column, title + intro right */
  .section-head {
    grid-template-columns: repeat(12, 1fr);
    column-gap: 2rem;
    align-items: baseline;
  }

  .section-head .section-meta {
    grid-column: 1 / span 3;
  }

  .section-head h2,
  .section-head .section-intro {
    grid-column: 4 / -1;
  }

  /* Service groups: sticky group head on the left, content on the right */
  .service-group {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: 2rem;
    align-items: start;
  }

  .group-head {
    position: sticky;
    top: calc(var(--header-h) + 2rem);
    grid-column: 1 / span 3;
    margin-bottom: 0;
  }

  .service-list {
    grid-column: 4 / -1;
  }

  /* Content tiles and smart home panel share the content columns */
  .tile-grid,
  .smarthome-panel {
    grid-column: 4 / -1;
  }

  .service-row {
    grid-template-columns: 4.5rem 2.5rem 1fr;
    gap: 1.5rem;
    padding-block: 1.75rem;
  }

  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }

  .contact-card {
    padding: 1.75rem;
    min-height: 13rem;
  }

  .contact-card-wide {
    min-height: 0;
  }

  .about-grid {
    grid-template-columns: repeat(12, 1fr);
    column-gap: 2rem;
  }

  .about-head {
    grid-column: 1 / -1;
    grid-template-columns: repeat(12, 1fr);
  }

  .about-photo {
    grid-column: 1 / span 3;
  }

  /* Text aligns with the section title (column 4), photo sits left */
  .about-text {
    grid-column: 4 / span 8;
  }

  .about-text > p:first-of-type {
    font-size: var(--fs-lg);
  }
}


/* --------------------------------------------------------------------------
   12. Print
   Black on white, navigation hidden. On /widerruf/ the withdrawal form
   starts on a new page and gets write-in lines.
   -------------------------------------------------------------------------- */
@media print {
  @page {
    margin: 18mm 16mm;
  }

  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    border-color: #888 !important;
    box-shadow: none !important;
  }

  :root {
    color-scheme: light;
  }

  html,
  body {
    background: #fff !important;
  }

  body {
    padding: 0;
    font-size: 10.5pt;
    line-height: 1.45;
  }

  .skip-link,
  .site-notice,
  .site-header,
  .quick-actions,
  .footer-nav,
  .doc-toc,
  .doc-actions,
  .doc-callout,
  .heading-anchor,
  .doc-eyebrow,
  .stories,
  .cta-row {
    display: none !important;
  }

  .container {
    max-width: none;
    padding: 0;
  }

  .doc-page {
    padding: 0;
  }

  .doc-layout {
    display: block;
  }

  .doc,
  .doc-head {
    max-width: none;
  }

  a {
    text-decoration: none;
  }

  .doc-head h1 {
    font-size: 18pt;
  }

  .doc h2 {
    font-size: 13pt;
    break-after: avoid;
  }

  .doc h3 {
    font-size: 11.5pt;
    break-after: avoid;
  }

  .doc li {
    break-inside: avoid;
  }

  .doc-section {
    margin-top: 1rem;
    padding-top: 1rem;
  }

  /* Withdrawal form on its own sheet, with lines to write on */
  .doc-form-section {
    break-before: page;
    border-top: 0;
  }

  .withdrawal-form {
    padding: 0 0 0 1.25rem;
    border: 0;
  }

  .withdrawal-form li + li {
    margin-top: 1.1rem;
  }

  .withdrawal-form .fill::after {
    content: "";
    display: block;
    height: 2.2em;
    border-bottom: 1px solid #000 !important;
  }

  .site-footer {
    padding-top: 1.5rem;
    font-size: 8.5pt;
  }

  .footer-brand img {
    display: none;
  }
}


/* Order form and price list: exactly one A4 page, black on white */
@page sheet {
  size: A4 portrait;
  margin: 15mm;
}

@media print {
  .page-form .order-screen,
  .page-form .site-footer {
    display: none !important;
  }

  body.page-form {
    page: sheet;
  }

  .order-sheet {
    max-width: none;
    padding: 0;
    border: 0;
    font-size: 8.75pt;
    line-height: 1.25;
  }

  .order-logo-screen {
    display: none !important;
  }

  .order-logo-print {
    display: block !important;
    width: 26mm;
  }

  .order-head {
    flex-wrap: nowrap;
    gap: 8mm;
    padding-bottom: 2.5mm;
    border-bottom: 1px solid #000 !important;
  }

  .order-provider h1 {
    margin-bottom: 1mm;
    font-size: 16pt;
  }

  .order-provider p {
    font-size: 8.5pt;
    line-height: 1.4;
  }

  .order-meta,
  .field-row,
  .sign-grid {
    grid-template-columns: 1fr 1fr;
    column-gap: 10mm;
  }

  .order-meta {
    margin-top: 2mm;
  }

  .order-block {
    margin-top: 2.6mm;
    break-inside: avoid;
  }

  .order-block legend,
  .order-legend {
    margin-bottom: 0.6mm;
    padding-bottom: 0.5mm;
    border-bottom: 1px solid #000 !important;
    font: 600 9pt / 1.3 var(--font-sans);
    letter-spacing: 0;
  }

  .field {
    margin-top: 0.8mm;
  }

  .field input,
  .check-amount .amount {
    height: 5.2mm;
    padding: 0 1mm;
    border-bottom: 0.75pt solid #000 !important;
  }

  .check-amount .amount {
    flex-basis: 20mm;
    height: 4.8mm;
  }

  .field-stack label {
    margin-bottom: 0;
  }

  /* iOS/iPadOS paint native (dark) form controls in print unless the
     native appearance is switched off and a light background is forced */
  .order-sheet input,
  .order-sheet textarea {
    -webkit-appearance: none;
    appearance: none;
    color-scheme: light;
    background-color: #fff !important;
    color: #000 !important;
    -webkit-text-fill-color: #000;
  }

  .field textarea {
    --rule: 5mm;
    height: calc(var(--rule) * 4);
    min-height: 0;
    margin-top: 0.5mm;
    overflow: hidden;
    resize: none;
    /* Opaque white instead of "transparent": the iOS print pipeline drops
       the alpha channel and turned transparent gradient stops black */
    background-image: repeating-linear-gradient(
      to bottom,
      #fff 0,
      #fff calc(var(--rule) - 0.75pt),
      #000 calc(var(--rule) - 0.75pt),
      #000 var(--rule)
    ) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .check-group {
    gap: 0.6mm 6mm;
    margin-top: 1mm;
  }

  .check {
    gap: 2mm;
    margin-top: 0.8mm;
  }

  .check input[type="checkbox"] {
    width: 3.6mm;
    height: 3.6mm;
    margin-top: 0.3mm;
    border: 1pt solid #000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .check input[type="checkbox"]:checked {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  }

  .check-note {
    padding-left: 5.6mm;
    font-size: 8pt;
  }

  .rate-row {
    gap: 0.8mm 5mm;
    margin-top: 1mm;
  }

  p.check-note {
    margin-top: 0.3mm;
    padding-left: 0;
  }

  .order-small {
    margin-top: 0.6mm;
    font-size: 8pt;
  }

  .order-consent {
    padding: 1.5mm 3mm 2mm;
    border: 1.5pt solid #000 !important;
    border-radius: 0;
  }

  .order-consent .check label {
    font-weight: 600;
  }

  .sign-line {
    height: 8.5mm;
    border-bottom: 0.75pt solid #000 !important;
  }

  .sign-col p,
  .sign-col label {
    margin-top: 0.5mm;
    font-size: 8pt;
  }

  .sign-input {
    padding: 2.5mm 1mm 0;
  }

  .order-foot {
    margin-top: 2.5mm;
    padding-top: 1mm;
    font-size: 7.5pt;
  }
}


/* Price list on paper */
@media print {
  .price-intro {
    margin-top: 2mm;
    font-size: 8.5pt;
  }

  .price-block {
    margin-top: 5mm;
    break-inside: avoid;
  }

  .price-block h2 {
    margin-bottom: 1mm;
    padding-bottom: 0.6mm;
    border-bottom: 1px solid #000 !important;
    font: 600 10pt / 1.3 var(--font-sans);
    letter-spacing: 0;
  }

  .price-block h3 {
    margin: 3mm 0 1mm;
    font-size: 9.5pt;
  }

  .price-sheet {
    font-size: 9.5pt;
    line-height: 1.35;
  }

  .price-table th {
    padding: 1mm 0;
    border-bottom: 0.75pt solid #000 !important;
    font-size: 8pt;
  }

  .price-table td {
    padding: 1.6mm 0;
    border-bottom: 0.5pt solid #999 !important;
  }

  .price-foot a::after {
    content: " (dienstleistung.speidel.it/agb)";
  }
}
