/* Territorial.io Wiki – gemeinsames Design für alle Seiten */
* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  color-scheme: dark; /* dunkle System-Scrollbars und Formularfelder */
  scrollbar-color: #344356 #10151c; /* Firefox, Chrome und Edge ab 121: Griff, Schiene */
}

/* Scrollbars für Safari und ältere Chrome-Versionen */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: #10151c; }
::-webkit-scrollbar-thumb { background: #344356; border-radius: 6px; border: 3px solid #10151c; }
::-webkit-scrollbar-thumb:hover { background: #ffb238; }
::-webkit-scrollbar-corner { background: #10151c; }
body {
  margin: 0;
  font: 16px/1.65 "Trebuchet MS", "Segoe UI", Roboto, Arial, sans-serif;
  color: #dfe6ee;
  background: #10151c;
}
a { color: #ffb238; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Kopfleiste: Marke, "All articles", Suche */
.site-header {
  background: linear-gradient(180deg, #1b2430, #151c25);
  border-bottom: 2px solid #ffb238;
  padding: 6px 16px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px;
  font-weight: 700; font-size: 1.1rem; letter-spacing: 0.02em;
  color: #ffffff;
}
.brand:hover { text-decoration: none; }
.header-link {
  display: flex; align-items: center;
  min-height: 44px; padding: 0 4px;
  color: #9fb0c3;
  text-transform: uppercase; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em;
}
.header-link:hover { color: #ffffff; text-decoration: none; }
.search { margin-left: auto; display: flex; flex: 0 1 260px; }
.search input {
  width: 100%; min-height: 40px; padding: 0 12px;
  font: inherit; font-size: 0.95rem;
  color: #ffffff; background: #10151c;
  border: 1px solid #344356; border-radius: 8px;
}
.search input::placeholder { color: #6b7c90; }
.search input:focus { outline: none; border-color: #ffb238; }

/* Inhalt */
main { max-width: 860px; margin: 0 auto; padding: 24px 16px 56px; }
article { background: #18202a; border: 1px solid #263241; border-radius: 12px; padding: 28px 32px; }

.breadcrumb { margin: 0 0 12px; font-size: 0.875rem; color: #6b7c90; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.breadcrumb li + li::before { content: "›"; margin: 0 8px; color: #6b7c90; }
.breadcrumb a { color: #9fb0c3; }

h1 { font-size: 2.2rem; line-height: 1.2; margin: 0 0 6px; color: #ffffff; }
h2 { font-size: 1.35rem; margin: 40px 0 12px; color: #ffb238; }
h3 { font-size: 1.05rem; margin: 24px 0 8px; color: #ffffff; }
h4 { font-size: 0.95rem; margin: 20px 0 6px; color: #9fb0c3; }
.updated {
  display: inline-block; margin: 0 0 20px;
  font-size: 0.8rem; color: #10151c; background: #6fd08c;
  padding: 2px 10px; border-radius: 999px; font-weight: 700;
}
.lead { font-size: 1.125rem; color: #ffffff; }

.toc { border: 1px solid #263241; background: #10151c; border-radius: 10px; padding: 12px 20px; margin: 24px 0; }
.toc h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: #9fb0c3; margin: 0 0 4px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc a { display: inline-block; padding: 6px 0; }

dfn { font-style: normal; font-weight: 700; color: #ffffff; }
code { font: 0.9em Consolas, Menlo, monospace; background: #263241; color: #ffd28a; padding: 2px 6px; border-radius: 4px; }
pre { background: #0b0f14; border: 1px solid #263241; border-radius: 10px; padding: 14px 18px; overflow-x: auto; }
pre code { background: none; padding: 0; color: #6fd08c; }
p code, li code { overflow-wrap: anywhere; } /* lange URLs umbrechen statt Seite verbreitern */

.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid #263241; }
table { border-collapse: collapse; width: 100%; min-width: 480px; }
th, td { text-align: left; padding: 10px 14px; }
th { background: #263241; color: #ffb238; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
tbody tr:nth-child(even) { background: #1d2733; }

.note { border: 1px solid #ffb238; background: rgba(255, 178, 56, 0.08); padding: 12px 16px; border-radius: 10px; margin: 16px 0; }

/* Related articles am Ende eines Artikels */
.related { margin-top: 48px; padding-top: 8px; border-top: 1px solid #263241; }
.related h2 { margin-top: 16px; }

/* Artikel-Listen: Übersichtsseite und Related articles */
.article-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.article-list a {
  display: block; min-height: 44px; padding: 10px 14px;
  background: #10151c; border: 1px solid #263241; border-radius: 10px;
}
.article-list a:hover { border-color: #ffb238; text-decoration: none; }
.article-list strong { display: block; color: #ffb238; }
.article-list span { display: block; font-size: 0.9rem; color: #9fb0c3; }

/* Übersichtsseite */
.category { scroll-margin-top: 16px; }
.no-results { color: #9fb0c3; }

.site-footer { padding: 20px 16px; text-align: center; color: #6b7c90; font-size: 0.875rem; }

@media (min-width: 700px) {
  .article-list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .header-link { display: none; } /* Marke führt ebenfalls zur Übersicht */
  .search { flex-basis: 100%; margin-left: 0; }
  main { padding: 16px 8px 40px; }
  article { padding: 20px 16px; border-radius: 8px; }
  h1 { font-size: 1.7rem; }
}
