/* Grundlayout */
:root {
  --bg: #f7faf9;
  --text: #0f1b24;
  --muted: #4b5b66;
  --accent: #0f6c5c;
  --accent-soft: #d8eee9;
  --card: #ffffff;
  --border: #d7e2dd;
  --shadow: 0 10px 30px rgba(15, 108, 92, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

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

a:hover,
a:focus-visible {
  text-decoration: underline;
}

h1, h2, h3 {
  margin: 0 0 0.4rem;
  line-height: 1.25;
}

p {
  margin: 0 0 1rem;
}

ul {
  margin: 0 0 1rem 1.2rem;
  padding: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: -999px;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 999;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.page-hero {
  background: radial-gradient(circle at 10% 20%, #e1f3ef 0, #f7faf9 45%), #f7faf9;
  padding: 2.5rem 1.25rem 2rem;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.35rem;
}

.lede {
  font-size: 1.1rem;
  max-width: 820px;
  color: var(--muted);
}

.layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 1.5rem;
  max-width: 1200px;
  padding: 1.5rem;
  margin: 0 auto;
}

.toc {
  position: sticky;
  top: 1rem;
  align-self: start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.toc-toggle {
  display: none;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.75rem;
  border-radius: 10px;
  font-weight: 600;
}

.toc nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc nav li {
  margin-bottom: 0.6rem;
}

.toc nav a {
  color: var(--text);
  font-weight: 600;
}

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

main {
  min-width: 0;
}

.section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.section-header {
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--muted);
}

.columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid var(--border);
}

.article-page {
  background: var(--bg);
}

.detail-article {
  max-width: 960px;
  margin: 0 auto 2rem;
  padding: 0 1rem;
}

.detail-header {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.breadcrumb {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.article-meta {
  color: var(--muted);
}

.article-body {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin-top: 1rem;
  box-shadow: var(--shadow);
}

.article-body h2 {
  margin-top: 1.4rem;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.article-body th,
.article-body td {
  border: 1px solid var(--border);
  padding: 0.5rem;
  text-align: left;
}

.article-footer {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-start;
}

.contact-form {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.contact-form .form-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.contact-form label {
  font-weight: 700;
}

.contact-form input,
.contact-form textarea {
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
}

.form-feedback {
  margin: 0.5rem 0;
  padding: 0.75rem 1rem;
  border-radius: 10px;
}

.form-feedback.success {
  background: #d8eee9;
  color: var(--text);
}

.form-feedback.error {
  background: #fbe9e9;
  color: #7a1d1d;
}

.glossary-controls {
  margin-bottom: 1rem;
}

#glossary-search {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
}

.search-hint {
  color: var(--muted);
  margin-top: 0.35rem;
  font-size: 0.95rem;
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.glossary-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  background: #fff;
  position: relative;
}

.glossary-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  border: 1px solid var(--border);
}

.definition {
  font-weight: 600;
}

.more {
  margin-bottom: 0.5rem;
}

.copy-link {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

.copy-link:hover,
.copy-link:focus-visible {
  background: #0c5a4d;
}

.modules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.module {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  background: #fff;
}

.checklist {
  columns: 2;
  column-gap: 1.5rem;
  list-style: none;
  padding: 0;
}

.checklist li {
  margin-bottom: 0.6rem;
  padding-left: 1.4rem;
  position: relative;
}

.checklist li::before {
  content: "•";
  color: var(--accent);
  position: absolute;
  left: 0;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.faq-item {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.cta {
  background: linear-gradient(135deg, #0f6c5c, #0c4f43);
  color: #fff;
}

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

.cta-list {
  margin: 0.5rem 0 0;
  list-style: none;
  padding: 0;
}

.cta-list li {
  margin-bottom: 0.4rem;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.2rem;
  background: #fff;
  color: var(--accent);
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  border: none;
}

.sources ul {
  margin-left: 1.2rem;
}

.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: none;
}

.back-to-top.show {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  align-items: center;
}

.site-nav a {
  color: var(--text);
  font-weight: 700;
}

.site-nav .brand {
  color: var(--accent);
  margin-right: 0.5rem;
}

.site-footer {
  margin-top: 2rem;
  padding: 1.5rem 1rem;
  background: var(--card);
  border-top: 1px solid var(--border);
  text-align: center;
}

.site-footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.article-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  background: #fff;
  box-shadow: var(--shadow);
}

.article-card h3,
.article-card h4 {
  margin: 0 0 0.4rem;
}

.article-subline {
  color: var(--muted);
  margin: 0 0 0.6rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
}

.readmore {
  font-weight: 700;
}

.readmore.disabled {
  color: var(--muted);
  cursor: not-allowed;
  text-decoration: none;
}

.top-articles,
.further-articles {
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.cluster-block {
  margin-bottom: 1.5rem;
}

.cluster-head {
  margin-bottom: 0.5rem;
}

.cluster-head h3 {
  margin: 0 0 0.2rem;
}

.cluster-desc {
  margin: 0;
  color: var(--muted);
}

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

/* Responsive */
@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .toc {
    position: static;
  }

  .toc-toggle {
    display: inline-block;
    margin-bottom: 0.5rem;
  }

  .toc nav {
    display: none;
  }

  .toc nav.open {
    display: block;
  }

  .toc nav ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.35rem;
  }

  .toc nav li {
    margin: 0;
  }

  .toc nav a {
    display: block;
    padding: 0.65rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card);
  }

  .checklist {
    columns: 1;
  }
}
