/* Element defaults, typography, page background and layout primitives. Tokens only (FE-C1). */
html { background: var(--color-bg); }

/* The page background (owner's design template, FE-D11): soft teal glows over the honeycomb over the
   background colour. Content always sits on solid surfaces (cards, panels) or directly on this
   background with full text contrast — the pattern is too faint to affect legibility. */
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image:
    radial-gradient(60rem 40rem at 100% 0%, var(--color-glow), transparent 70%),
    radial-gradient(50rem 36rem at 0% 100%, var(--color-glow), transparent 70%),
    var(--pattern-honeycomb);
  background-size: auto, auto, var(--pattern-honeycomb-size);
  background-attachment: scroll;
}
@media (min-width: 992px) {
  body { background-attachment: fixed, fixed, fixed; }
}

h1, h2, h3, h4 {
  line-height: var(--leading-tight);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
}
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); font-weight: var(--weight-semibold); }
h4 { font-size: var(--text-base); font-weight: var(--weight-semibold); }
@media (min-width: 768px) { h1 { font-size: var(--text-4xl); } }

/* The accent word in a heading: italic serif in brand green (template: "Die KI-Plattform"). */
.accent {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: var(--weight-regular);
  color: var(--color-primary);
  letter-spacing: 0;
}

p { max-width: var(--content-max); }
small { font-size: var(--text-sm); }
code, kbd, samp { font-family: var(--font-mono); font-size: 0.9em; }
strong { font-weight: var(--weight-semibold); }

a { color: var(--color-primary); text-underline-offset: 0.15em; }
a:hover { color: var(--color-primary-hover); }

:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-control); }

hr { border: 0; border-top: 1px solid var(--color-border); }

/* Layout primitives */
.container { width: 100%; max-width: var(--app-max); margin-inline: auto; padding-inline: var(--space-4); }
.container--site { max-width: var(--site-max); }
@media (min-width: 768px) { .container { padding-inline: var(--space-6); } }
.stack > * + * { margin-top: var(--space-4); }
.stack--tight > * + * { margin-top: var(--space-2); }
.stack--loose > * + * { margin-top: var(--space-6); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.grid { display: grid; gap: var(--space-4); }
@media (min-width: 768px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 992px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.muted { color: var(--color-text-muted); }
.pre-line { white-space: pre-line; }
/* Rich text (U-0224, ADR-0040): the job description as the API cleaned it — paragraphs, bold,
   italic and the two lists; in the portal's editor and on the public ad page alike. */
.rich-text > * + * { margin-top: var(--space-3); }
.rich-text ul, .rich-text ol { padding-left: var(--space-6); }
.rich-text ul { list-style: disc; }
.rich-text ol { list-style: decimal; }
.rich-text li + li { margin-top: var(--space-1); }
.rich-text strong, .rich-text b { font-weight: var(--weight-bold); }
.lead { font-size: var(--text-lg); line-height: var(--leading-normal); color: var(--color-text-muted); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--space-4); top: -100%;
  z-index: 100; padding: var(--space-2) var(--space-4);
  background: var(--color-surface); color: var(--color-text);
  border-radius: var(--radius-control); box-shadow: var(--shadow-2);
}
.skip-link:focus-visible { top: var(--space-4); }

/* A surface that shows the honeycomb on its own (sidebar brand header). */
.honeycomb {
  background-color: var(--color-surface);
  background-image: var(--pattern-honeycomb);
  background-size: var(--pattern-honeycomb-size);
}
