@import url("/Assets/letterpress-local.css");

/*
 * Lokal ausgelieferte Schriften. Dadurch entstehen beim Seitenaufruf keine
 * Verbindungen zu Google Fonts oder Bunny Fonts.
 */
@font-face {
  font-family: "Fraunces Local";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/Assets/fonts/fraunces-latin-variable.woff2") format("woff2");
}

@font-face {
  font-family: "Fraunces Local";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("/Assets/fonts/fraunces-latin-variable-italic.woff2") format("woff2");
}

@font-face {
  font-family: "Source Sans 3 Local";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/Assets/fonts/source-sans-3-latin-variable.woff2") format("woff2");
}

@font-face {
  font-family: "Source Sans 3 Local";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("/Assets/fonts/source-sans-3-latin-variable-italic.woff2") format("woff2");
}

/*
 * Kogniversum-Hausstil auf Basis des Flowershow-Themes "Letterpress".
 */

:root {
  --color-l-background: #f5f2e9;
  --color-l-foreground: #202a27;
  --color-l-accent: #2f665c;
  --color-d-background: #121815;
  --color-d-foreground: #ebe8de;
  --color-d-accent: #8fc0b1;
  --kogniversum-header-background: #1d2b27;
  --kogniversum-header-background-soft: #315f55;
  --kogniversum-header-foreground: #f5f2e9;
  --font-heading: "Fraunces Local", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  --font-body: "Source Sans 3 Local", ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --font-size-base: 1.0625rem;
  --font-line-height-body: 1.5;
  --font-line-height-headings: 1.12;
  --font-size-h1: clamp(2.35rem, 4.2vw, 3.4rem);
  --font-size-h2: clamp(1.75rem, 2.8vw, 2.2rem);
  --font-size-h3: clamp(1.3rem, 1.8vw, 1.6rem);
  --font-size-h4: 1.2rem;
  --width-content: 42.5rem;
  --width-content-toc: 76rem;
  --width-content-toc-sidebar: 82rem;
  --width-list-component: 68rem;
  --width-navbar: 72rem;
  --width-footer: 72rem;
}

/* Zugeordnete Themen am Ende eines Artikels */
.kogniversum-page-start {
  display: block;
  height: 0;
  scroll-margin-top: 7rem;
}

.kogniversum-footnote-ref {
  margin-left: 0.08em;
  font-size: 0.78em;
  text-decoration: none;
}

.kogniversum-footnotes {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--kv-line, rgba(36, 54, 50, 0.18));
  color: var(--kv-muted, #65706d);
  font-size: 0.9rem;
}

.kogniversum-footnotes ol {
  margin: 0;
  padding-left: 1.4rem;
}

.kogniversum-footnotes li {
  padding-left: 0.2rem;
}

.kogniversum-footnote-backref {
  margin-left: 0.2rem;
  text-decoration: none;
}

.kogniversum-article-topics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2.75rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--kv-line, rgba(36, 54, 50, 0.18));
  font-size: 0.9rem;
}

.kogniversum-article-topics-label {
  margin-right: 0.15rem;
  color: var(--kv-muted, #65706d);
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.kogniversum-article-topics a {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.7rem;
  border: 1px solid var(--kv-line, rgba(36, 54, 50, 0.18));
  border-radius: 999px;
  color: var(--kv-accent, #28675d);
  background: rgba(255, 255, 255, 0.28);
  font-weight: 550;
  line-height: 1.25;
  text-decoration: none;
}

.kogniversum-article-topics a:hover,
.kogniversum-article-topics a:focus-visible {
  border-color: currentColor;
  background: rgba(255, 255, 255, 0.55);
  text-decoration: none;
}

.site-navbar {
  color: var(--kogniversum-header-foreground);
  background: color-mix(in srgb, var(--kogniversum-header-background) 94%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--kogniversum-header-foreground) 18%, transparent);
  backdrop-filter: blur(12px);
}

.site-navbar-site-title,
.site-navbar-link,
.site-navbar-dropdown-trigger,
.site-navbar-mobile-nav-button,
.site-navbar-theme-switch-container {
  color: var(--kogniversum-header-foreground);
}

.site-navbar-site-title {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

.site-navbar-link {
  text-underline-offset: 0.25em;
}

/* Die kurze Kogniversum-Navigation passt bereits auf Tabletbreite. */
@media (min-width: 768px) {
  .site-navbar-site-title {
    flex-grow: 0;
    flex-shrink: 0;
  }

  .site-navbar-links-container {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
  }

  .site-navbar-dropdown {
    display: inline-flex;
    align-items: center;
  }

  .site-navbar-mobile-nav-button {
    display: none;
  }

  .site-navbar-search-container {
    min-width: 12rem;
    flex: 1 1 auto;
  }

  .search-button {
    width: 12rem;
    max-width: 12rem;
  }

  .search-placeholder {
    display: inline-block;
  }
}

.page-hero-container {
  background:
    radial-gradient(circle at 78% 18%, color-mix(in srgb, var(--kogniversum-header-background-soft) 72%, transparent), transparent 42%),
    linear-gradient(145deg, #18231f, var(--kogniversum-header-background));
  border-bottom: 1px solid color-mix(in srgb, var(--kogniversum-header-foreground) 16%, transparent);
}

.page-hero {
  max-width: var(--width-hero-no-img);
  padding: calc(4rem + 2.25rem) 0 1.75rem;
  text-align: left;
}

.page-hero-content {
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.page-hero-title {
  max-width: 14ch;
  color: var(--kogniversum-header-foreground);
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.page-hero-description {
  max-width: 46rem;
  color: color-mix(in srgb, var(--kogniversum-header-foreground) 82%, transparent);
  text-wrap: balance;
}

.rendered-mdx .heading-link {
  display: none;
}

.page-header {
  display: flex;
  min-height: 0 !important;
  flex-direction: column;
  align-items: flex-start;
  padding-top: clamp(2rem, 3.5vw, 3rem);
}

.page-main > .page-header,
.page-main > .listing-page > .page-header,
.page-main > .post-page > .page-header {
  margin-bottom: 0 !important;
  padding-bottom: clamp(0.75rem, 1.25vw, 1rem) !important;
  border-bottom: 1px solid color-mix(in srgb, var(--color-foreground) 14%, transparent);
}

.page-main > .page-body,
.page-main > .listing-page > .page-body,
.page-main > .post-page > .page-body {
  margin-top: 0 !important;
  padding-top: clamp(0.8rem, 1.4vw, 1.15rem) !important;
}

.page-main > .page-header .page-header-title,
.page-main > .listing-page > .page-header .page-header-title,
.page-main > .post-page > .page-header .page-header-title {
  max-width: 20ch;
  margin: 0 !important;
  font-size: clamp(2.1rem, 3vw, 2.95rem) !important;
  font-weight: var(--font-weight-headings) !important;
  line-height: 1.08 !important;
  letter-spacing: -0.025em !important;
  text-wrap: balance;
}

.page-main > .listing-page .listing-page-listing {
  margin-top: 0 !important;
  padding-top: 0 !important;
  border-top: 0 !important;
}

.page-main > .listing-page .list-component-group-heading {
  padding-bottom: 0 !important;
  border-bottom: 0 !important;
}

.page-header-description {
  max-width: 44rem;
  margin: 0.3rem 0 0 !important;
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  line-height: 1.45;
  text-wrap: pretty;
}

.page-header-metadata-container {
  margin: 0.8rem 0 0 !important;
}

.page-header [aria-label="Breadcrumb"] {
  margin: 0 0 0.8rem !important;
}

.page-body .rendered-mdx > p:first-child {
  max-width: 48rem;
  color: color-mix(in srgb, var(--color-foreground) 88%, transparent);
  font-size: 1.02em;
  line-height: 1.42;
}

/* Lesefreundliche Zeilenlänge für Artikel; Übersichten behalten ihre Breite. */
.post-page .page-body .rendered-mdx {
  max-width: 42.5rem;
  line-height: 1.42;
}

.post-page .page-body .rendered-mdx p {
  margin-top: 0;
  margin-bottom: 1.05em;
}

.toc-title {
  font-size: 0;
}

.toc-title::before {
  content: "Inhalt";
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: none;
}

@media (min-width: 900px) and (max-width: 1279px) {
  .layout-inner.has-toc {
    max-width: 76rem;
    grid-template-columns: minmax(0, 1fr) minmax(11rem, 13rem);
    column-gap: 2rem;
  }

  .layout-inner.has-toc > .layout-inner-right {
    display: block;
  }
}

@media (min-width: 900px) {
  .layout-inner.has-toc > .layout-inner-right {
    align-self: stretch;
    padding-left: 1.5rem;
  }

  .layout-inner-right > * + * {
    margin-top: 1.5rem;
  }

  .page-toc-container {
    position: sticky;
    top: 6.5rem;
    margin-top: clamp(2.25rem, 4vw, 3.5rem);
    padding: 1.1rem 1.15rem 0.75rem;
    border: 1px solid color-mix(in srgb, var(--color-foreground) 12%, transparent);
    border-radius: 0.5rem;
    background: color-mix(in srgb, var(--color-background) 94%, var(--color-accent));
    box-shadow: 0 0.5rem 1.5rem color-mix(in srgb, var(--color-foreground) 6%, transparent);
  }

  .page-toc-container .toc {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  .page-toc-container .toc > :last-child {
    margin-bottom: 0 !important;
  }

  .page-toc-container .toc-title,
  .page-toc-container .toc-title::before {
    color: var(--color-accent);
  }

  .page-toc-container a {
    color: color-mix(in srgb, var(--color-foreground) 78%, transparent);
    text-decoration: none;
  }

  .page-toc-container a:hover,
  .page-toc-container a:focus-visible {
    color: var(--color-accent);
  }
}

.page-header-metadata-container {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.4;
  text-transform: none;
}

.page-header-metadata-container > * {
  margin: 0 !important;
}

.page-header-date {
  display: inline-flex;
  font-size: inherit;
}

.page-header-authors-container {
  display: flex;
  align-items: baseline;
}

.page-header-metadata-container:has(.page-header-author-name) .page-header-date::before {
  margin-right: 0.55rem;
  color: var(--color-foreground-500);
  content: "\00b7";
}

.page-header-authors-avatars-container {
  display: none;
}

.page-header-author-name {
  color: var(--color-foreground-500);
  font-family: var(--font-body);
  font-size: inherit;
}

.kogniversum-topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.rendered-mdx a.kogniversum-topic-card,
.rendered-mdx a.kogniversum-topic-card:visited,
.rendered-mdx a.kogniversum-topic-card:hover,
.rendered-mdx a.kogniversum-topic-card:focus-visible {
  display: flex;
  min-height: 7.75rem;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem;
  color: inherit;
  text-decoration: none !important;
  border: 1px solid color-mix(in srgb, var(--color-foreground) 14%, transparent);
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--color-background) 95%, var(--color-accent));
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.kogniversum-topic-card:hover,
.kogniversum-topic-card:focus-visible {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--color-accent) 52%, transparent);
  box-shadow: 0 0.75rem 1.5rem color-mix(in srgb, var(--color-foreground) 10%, transparent);
}

.kogniversum-topic-card strong {
  color: var(--color-accent);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  line-height: 1.25;
  text-decoration: underline;
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.16em;
}

.kogniversum-topic-card > span:last-child {
  color: var(--color-foreground-600);
  font-size: 0.96rem;
  line-height: 1.4;
}

.kogniversum-topic-icon {
  font-size: 1.35rem;
}

.list-component-item {
  border-color: color-mix(in srgb, var(--color-foreground) 14%, transparent);
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.list-component-item:hover {
  border-color: color-mix(in srgb, var(--color-accent) 45%, transparent);
}

/* Platzsparende, aber redaktionell wirkende Artikellisten auf Themenseiten. */
.listing-page[data-view="compact"] {
  --list-max-width: 56rem;
}

.listing-page[data-view="compact"] .list-component-group-heading {
  margin: 0 0 0.75rem !important;
  color: var(--color-accent);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.listing-page[data-view="compact"] .list-component-item {
  margin: 0.35rem 0;
  padding: 0.8rem 0.9rem;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 0.35rem;
  background: transparent;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.listing-page[data-view="compact"] .list-component-item:hover,
.listing-page[data-view="compact"] .list-component-item:focus-within {
  border-left-color: var(--color-accent);
  background: color-mix(in srgb, var(--color-background) 94%, var(--color-accent));
}

.listing-page[data-view="compact"] .list-component-item-date {
  color: var(--color-foreground-500);
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.015em;
}

.listing-page[data-view="compact"] .list-component-item-content .list-component-item-headline {
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  font-weight: var(--font-weight-headings);
  line-height: 1.35;
}

.listing-page[data-view="compact"] .list-component-item-headline-link {
  color: var(--color-foreground-700);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--color-accent) 45%, transparent);
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.18em;
}

.listing-page[data-view="compact"] .list-component-item-headline-link:hover,
.listing-page[data-view="compact"] .list-component-item-headline-link:focus-visible {
  color: var(--color-accent);
  text-decoration-color: currentColor;
}

.list-component[data-view="grid"] .list-component-item {
  min-height: 0;
  justify-content: flex-start;
  padding: 0.55rem 1rem 0.9rem;
  border: 1px solid color-mix(in srgb, var(--color-foreground) 13%, transparent);
  border-radius: 0.35rem;
  background: color-mix(in srgb, var(--color-background) 94%, var(--color-accent));
}

.list-component[data-view="grid"] .list-component-item-content {
  margin: 0;
  padding: 0;
}

.list-component[data-view="grid"] .list-component-item-content .list-component-item-headline {
  margin-bottom: 0.3rem;
  font-size: clamp(1.1rem, 1.7vw, 1.35rem);
  line-height: 1.3;
}

.list-component[data-view="grid"] .list-component-item-summary {
  margin-bottom: 0.35rem;
  font-size: 0.94rem;
  line-height: 1.45;
}

.list-component[data-view="grid"] .list-component-item-meta {
  margin-top: 0.25rem;
  font-size: 0.72rem;
}

.list-component[data-view="grid"] .list-component-item:hover {
  transform: translateY(-2px);
}

.rendered-mdx blockquote {
  border-left-color: var(--color-accent);
}

.rendered-mdx [data-callout] {
  border-color: color-mix(in srgb, var(--color-accent) 34%, transparent);
  background: color-mix(in srgb, var(--color-background) 92%, var(--color-accent));
}

/* Kompakter Premium-Custom-Footer aus _footer.html. */
.site-footer-inner {
  padding-top: 1.5em;
  padding-bottom: 1.5em;
}

.site-footer-custom .kogniversum-footer-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  width: 100%;
}

.site-footer-custom .kogniversum-footer-copyright,
.site-footer-custom .kogniversum-footer-links,
.site-footer-custom .kogniversum-footer-links a {
  white-space: nowrap;
}

.site-footer-custom .kogniversum-footer-links {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
}

.site-footer-custom .kogniversum-footer-links a {
  color: inherit;
  text-underline-offset: 0.2em;
}

@media (min-width: 1025px) and (max-width: 1279px) {
  .layout-inner.has-sidebar {
    grid-template-columns: 14rem minmax(0, 1fr);
    column-gap: 2rem;
  }

  .layout-inner.has-sidebar > .layout-inner-center {
    min-width: 0;
  }
}

@media (max-width: 640px) {
  :root {
    --font-size-base: 1rem;
  }

  .page-hero-title {
    letter-spacing: -0.035em;
  }

  .page-hero {
    padding: calc(4rem + 1.5rem) 1.25rem 1.5rem;
  }

  .page-header {
    padding-top: 1.75rem;
  }

  .page-main > .page-header,
  .page-main > .listing-page > .page-header,
  .page-main > .post-page > .page-header {
    padding-bottom: 0.65rem !important;
  }

  .page-main > .page-body,
  .page-main > .listing-page > .page-body,
  .page-main > .post-page > .page-body {
    padding-top: 0.75rem !important;
  }

  .page-main > .page-header .page-header-title,
  .page-main > .listing-page > .page-header .page-header-title,
  .page-main > .post-page > .page-header .page-header-title {
    font-size: clamp(1.95rem, 8.5vw, 2.5rem) !important;
  }

  .kogniversum-topic-grid {
    grid-template-columns: 1fr;
  }

  .kogniversum-topic-card {
    min-height: 0;
  }
}
