/* Public chapters use the logo palette. Forest and brass identify the brand story. */
@media screen {
  :root {
    --section-forest: #062c20;
    --section-brass: #d4ac77;
    --section-brass-edge: #94764b;
    --section-petrol: #062c20;
    --section-petrol-border: #24533f;
    --section-petrol-muted: #b3cec6;
    --section-petrol-accent: #7ee6be;
    --section-base: var(--paper);
    --section-band: var(--grid-light);
    --section-border: #9aafc0;
    --section-muted: #4a6076;
    --section-accent: var(--green-strong);
    --section-card: var(--surface);
    --section-card-ink: var(--ink-deep);
    --section-card-muted: var(--section-muted);
    --section-card-edge: #778b9c;
    --section-space: clamp(52px, 6vw, 88px);
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --section-accent: var(--green);
      --section-band: #1b2d3d;
      --section-border: #4b6377;
      --section-muted: #c1cfdb;
      --section-card: #0f3a2b;
      --section-card-edge: #24533f;
    }
  }
  :root[data-theme="dark"] {
    --section-accent: var(--green);
    --section-band: #1b2d3d;
    --section-border: #4b6377;
    --section-muted: #c1cfdb;
    --section-card: #0f3a2b;
    --section-card-edge: #24533f;
  }

  /* Full-width chapters on the home and features pages. */
  .site-body #inhalt > :is(.feature-section,.workflow-section,.privacy-renewed,.name-story,.tabularia-section,.blog-teaser,.start-callout,.functions-intro,.functions-details) {
    padding-block: var(--section-space);
    border-top: 1px solid var(--section-border);
    margin-block: 0;
  }
  .site-body #inhalt > :is(.feature-section,.start-callout,.functions-intro,.functions-details) {
    background: var(--section-band);
    --muted: var(--section-muted);
    --green: var(--section-accent);
  }
  .site-body #inhalt > :is(.workflow-section,.name-story,.blog-teaser) { background: var(--section-base); }
  .feature-section .feature-grid { gap: 12px; border: 0; }
  .feature-section .feature-card {
    min-height: 0;
    border: 1px solid var(--section-border);
    border-radius: var(--radius-small);
    background: var(--surface);
  }
  .feature-section .feature-card:hover { transform: none; }
  .feature-section .feature-number { margin-bottom: 1.5rem; }
  .feature-section .feature-card p { margin-bottom: 0; }
  .feature-section .feature-details-link {
    display: flex;
    width: fit-content;
    max-width: 100%;
    margin: 28px auto 0;
  }
  .site-body #inhalt .privacy-renewed :is(.lead,figcaption span) { color: var(--section-petrol-muted); }
  .site-body #inhalt .name-story + .tabularia-section::before { display: none; }
  .site-body #inhalt .functions-showcase > .showcase-row {
    width: 100%;
    padding-inline: max(calc(var(--site-gutter) / 2), calc((100% - var(--shell)) / 2));
    padding-block: var(--section-space);
    border-color: var(--section-border);
    background: var(--section-base);
  }
  .site-body #inhalt .functions-showcase > .showcase-row:nth-child(even) {
    background: var(--section-band);
    --muted: var(--section-muted);
    --green: var(--section-accent);
  }

  /* Continue the alternating chapter sequence after any number of showcase rows.
     The technical chapter and final callout must not repeat their neighbour's surface. */
  .site-body #inhalt > .functions-showcase:has(> .showcase-row:last-child:nth-child(even)) + .functions-details,
  .site-body #inhalt > .functions-showcase:has(> .showcase-row:last-child:nth-child(odd)) + .functions-details + .start-callout {
    background: var(--section-base);
  }

  /* Contained topics on service, help, download, documentation and trial pages. */
  .site-body #inhalt :is(.help-faq,.setup-process,.download-support,.docs-content > section,.article-body > .faq,.order-terms) {
    padding: clamp(24px, 3vw, 40px);
    border: 1px solid var(--section-border);
    border-left: 4px solid var(--green);
    border-radius: 12px;
    background: var(--section-band);
    --muted: var(--section-muted);
    --green: var(--section-accent);
  }
  .site-body #inhalt > .privacy-renewed,
  .site-body #inhalt .help-page .help-faq {
    background: var(--section-petrol);
    --text: #edf6f3;
    --surface: #0f3a2b;
    --green: var(--section-petrol-accent);
    --muted: var(--section-petrol-muted);
    color: var(--text);
    border-color: var(--section-petrol-border);
  }
  .site-body #inhalt .help-page .help-faq {
    max-width: none;
    margin-block: 48px;
    border-left-color: var(--green);
    --ink-deep: var(--text);
    --border: var(--section-petrol-border);
  }
  .help-faq details > div { max-width: 72ch; }
  .help-faq details a { color: var(--green); text-decoration: underline; }
  .site-body #inhalt .setup-process { margin-block: 40px; }
  .site-body #inhalt .download-support { margin-top: 36px; }
  .site-body #inhalt .article-body > .faq { margin-top: 48px; }
  .site-body #inhalt .article-body > .faq h2 { margin-top: 16px; }
  .site-body .docs-shell { --slate: var(--section-muted); }
  .site-body #inhalt .docs-content > section { margin-block: 24px; }
  .site-body #inhalt .docs-content > section:nth-child(even) { background: var(--section-base); }
  .site-body #inhalt .docs-content > section > :last-child { margin-bottom: 0; }
  .site-body #inhalt .docs-content > section > h2 { margin-top: 0; }
  .site-body #inhalt .docs-content > section:nth-child(even) { --muted: inherit; --green: inherit; }
  .site-body #inhalt :is(.help-form,.trial-start-form,.download-card,.setup-offer) {
    background: var(--section-band);
    border-color: var(--section-border);
    --muted: var(--section-muted);
    --green: var(--section-accent);
  }
  .site-body #inhalt .order-terms { margin-top: 40px; padding: 22px 24px; }
  .site-body #inhalt .blog-tools { padding-bottom: 32px; margin-bottom: 32px; border-bottom: 1px solid var(--section-border); }


  /* Brand chapter and recurring editorial accents, drawn from the green leather and brass in the photographs. */
  .site-body #inhalt > .tabularia-section {
    --text: #f6f7ee;
    --ink-deep: var(--text);
    --muted: #b3cec6;
    background-color: var(--section-forest);
    background-image: radial-gradient(ellipse at 20% 42%, #134632, transparent 63%);
    color: var(--text);
    border-top-color: var(--section-brass-edge);
  }
  .site-body #inhalt .tabularia-figure::before {
    border-color: var(--section-brass-edge);
    background: radial-gradient(ellipse, #bc9c5720, transparent 69%);
    box-shadow: none;
    filter: none;
  }
  .site-body #inhalt .tabularia-copy > .eyebrow,
  .site-body #inhalt .start-copy > .eyebrow {
    color: var(--section-brass);
  }
  .site-body #inhalt :is(.tabularia-copy,.start-copy) > .eyebrow::before {
    content: "";
    display: inline-block;
    width: 1.75rem;
    height: 2px;
    margin-inline-end: .65rem;
    vertical-align: middle;
    background: currentColor;
  }
  .tabularia-section :is(.tabularia-attributes > div,.tabularia-cta) {
    --ink-deep: var(--section-card-ink);
    --muted: var(--section-card-muted);
    background: var(--section-card);
    border-color: var(--section-card-edge);
    color: var(--section-card-ink);
  }
  .tabularia-section .tabularia-cta { border-left-color: var(--green); }
  .site-body #inhalt .tabularia-attributes > div { border-top: 2px solid var(--section-brass); }
  .site-body #inhalt .start-panel { background: var(--section-forest); }
  .site-body #inhalt .blog-card .blog-cover { border-bottom: 2px solid var(--section-brass-edge); }

  @media (max-width: 760px) {
    :root { --section-space: 48px; }
    .feature-section .feature-details-link { width: 100%; }
    .site-body #inhalt :is(.help-faq,.setup-process,.download-support,.docs-content > section,.article-body > .faq) { padding: 24px 18px; }
    .site-body #inhalt .order-terms { padding: 20px 18px; }
    .site-body #inhalt .section-heading { gap: 20px; margin-bottom: 30px; }
  }
}

@media print {
  .tabularia-figure .tabularia-image { filter: brightness(0); }
}

/* One outer closing space for public pages; overlays do not count as chapters. */
@media screen{
 .site-body{--page-end-space:clamp(40px,4.5vw,64px)}
 .site-body #inhalt>:nth-last-child(1 of :not(script,style,dialog,.docs-lightbox,[hidden])){padding-bottom:var(--page-end-space)!important;margin-bottom:0}
}
