/***********************************************************************
** local.css
** Kolibriethos – dauerhafte Ergänzungen zur normalen PmWiki-Skin
**
** Diese Datei wird NACH pmwiki.css eingebunden.
** Sie überschreibt gezielt veraltete Vorgaben, ohne pmwiki.css zu ändern.
***********************************************************************/

:root {
  --ke-bg: #f6f9f4;
  --ke-surface: #ffffff;
  --ke-surface-soft: #edf4ea;
  --ke-text: #263229;
  --ke-muted: #667168;
  --ke-heading: #214b34;
  --ke-link: #286d49;
  --ke-link-hover: #174c32;
  --ke-border: #cad7c9;
  --ke-border-light: #dce5db;
  --ke-warning-bg: #fff7df;
  --ke-warning-border: #bf8b28;
  --ke-content-width: 1200px;
}

html {
  box-sizing: border-box;
  max-width: 100%;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  max-width: 100%;
  background-color: var(--ke-bg);
  color: var(--ke-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--ke-link);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--ke-link-hover);
}

a:focus-visible {
  outline: 3px solid rgba(40, 109, 73, 0.35);
  outline-offset: 3px;
  border-radius: 2px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--ke-heading);
  line-height: 1.25;
}

h1,
h2,
h3,
h6 {
  font-weight: 600;
}

h1 {
  margin-top: 0.7em;
  margin-bottom: 0.55em;
  font-size: clamp(1.9rem, 2.4vw, 2.8rem);
}

h2 {
  margin-top: 1.8em;
  margin-bottom: 0.65em;
  padding-bottom: 0.2em;
  font-size: clamp(1.5rem, 1.8vw, 2.05rem);
  border-bottom: 1px solid var(--ke-border-light);
}

h3 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-size: clamp(1.25rem, 1.3vw, 1.55rem);
}

h4 {
  font-size: 1.12rem;
}

.pagegroup {
  margin-top: 10px;
  margin-bottom: 4px;
  color: var(--ke-muted);
  font-size: 0.9rem;
}

.pagetitle {
  margin: 0;
  color: var(--ke-heading);
  font-size: clamp(1.8rem, 2.2vw, 2.6rem);
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

#wikilogo {
  margin-top: 0;
  padding: 10px 14px;
  border-bottom: none;
}

#wikilogo img {
  max-width: 100%;
  height: auto;
}

#wikihead {
  right: 14px;
  top: 12px;
  max-width: calc(100% - 28px);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 0.9rem;
}

#wikihead input {
  max-width: 100%;
  min-height: 2.1rem;
  padding: 0.3rem 0.45rem;
  font-size: 0.9rem;
}

#wikileft {
  width: 180px;
  padding: 12px;
  background: var(--ke-surface-soft);
  border-right: 1px solid var(--ke-border);
  color: #2f3a31;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 0.9rem;
  line-height: 1.45;
}

#wikileft .vspace {
  margin-top: 1rem;
}

#wikileft a {
  color: #294534;
  text-decoration: none;
}

#wikileft a:hover {
  color: var(--ke-link-hover);
  text-decoration: underline;
}

#wikileft ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#wikileft li {
  margin: 0;
  padding: 0.18rem 0 0.18rem 0.4rem;
}

.sidehead {
  margin: 0.9rem 0 0.25rem;
  padding: 0.35rem 0.25rem;
  color: var(--ke-heading);
  font-size: 0.95rem;
  font-weight: 700;
  font-style: normal;
  border-bottom: 1px solid var(--ke-border);
}

.sidehead a {
  color: var(--ke-heading);
  font-weight: 700;
  font-style: normal;
}

#wikibody {
  min-width: 0;
  padding: 0 20px 24px;
  background-color: var(--ke-surface);
  font-size: 1rem;
}

#wikitext {
  min-width: 0;
  max-width: var(--ke-content-width);
  margin-top: 18px;
  margin-right: auto;
  margin-left: auto;
  line-height: 1.65;
}

#wikitext p,
#wikitext li,
#wikitext td,
#wikitext th {
  overflow-wrap: break-word;
}

#wikicmds {
  float: right;
  max-width: 100%;
  white-space: normal;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 0.82rem;
  line-height: 1.5;
}

#wikicmds ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.2rem 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

#wikicmds li {
  display: block;
  margin: 0;
}

#wikicmds li a {
  display: inline-block;
  padding: 0.2rem 0.25rem;
  color: #405148;
  text-decoration: none;
  border: none;
}

#wikicmds li a.createlink {
  display: none;
}

#wikicmds li a:hover {
  color: var(--ke-link-hover);
  text-decoration: underline;
}

#wikitext img,
#wikibody img,
#wikilogo img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
  height: auto;
}

#wikitext img {
  border-radius: 4px;
}

#wikitext table {
  max-width: 100%;
  margin-top: 1rem;
  margin-bottom: 1.4rem;
  border-collapse: collapse;
  font-size: 0.96rem;
  line-height: 1.45;
}

#wikitext th,
#wikitext td {
  padding: 0.5rem 0.65rem;
  vertical-align: top;
  border: 1px solid var(--ke-border-light);
}

#wikitext th {
  background: var(--ke-surface-soft);
  color: var(--ke-heading);
  font-weight: 650;
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

textarea,
pre,
code {
  max-width: 100%;
  font-size: 0.9em;
}

pre,
code {
  font-family: "Lucida Console", "Andale Mono", "Courier New", Courier, monospace;
}

pre {
  padding: 0.8rem;
  overflow-x: auto;
  background: #f4f6f3;
  border: 1px solid #d8dfd7;
  border-radius: 4px;
  line-height: 1.4;
}

pre code,
code code,
pre pre {
  font-size: 100%;
}

#wikiedit form {
  width: 100%;
  margin: 0;
}

#wikiedit textarea {
  width: 100%;
  min-height: 28rem;
  padding: 0.7rem;
  line-height: 1.45;
  border: 1px solid #bfcbbf;
  border-radius: 4px;
}

input,
textarea,
select,
button {
  max-width: 100%;
}

.wikimessage {
  margin: 0.7rem 0;
  padding: 0.7rem 0.9rem;
  background: var(--ke-warning-bg);
  border-left: 4px solid var(--ke-warning-border);
  border-radius: 3px;
  color: #4f4123;
  font-style: normal;
}

#wikifoot {
  padding: 14px 18px 16px 198px;
  background: #eaf1e8;
  border-top: 1px solid var(--ke-border);
  color: #59665d;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 0.82rem;
  line-height: 1.55;
}

#wikifoot a {
  color: #3c604a;
}

/* Schutzregeln für schmale Desktopfenster.
   Die eigentliche mobile Darstellung bleibt in mobile.css. */
@media screen and (max-width: 900px) {
  #wikihead {
    position: static;
    width: auto;
    max-width: none;
    padding: 0 12px 10px;
    text-align: left;
  }

  #wikicmds {
    float: none;
    clear: both;
    margin-top: 0.5rem;
    margin-bottom: 0.8rem;
  }

  #wikicmds ul {
    justify-content: flex-start;
  }

  #wikifoot {
    padding-left: 18px;
  }
}

a.miniLink {
  font-size:10px;
  color: #c0c0c0;
}

@media print {
  body {
    width: auto;
    margin: 0;
    padding: 0.5em;
    background: #ffffff;
    color: #000000;
    font-size: 11pt;
  }

  #wikihead,
  #wikileft,
  #wikicmds,
  .footnav {
    display: none;
  }

  #wikibody,
  #wikitext {
    max-width: none;
    margin: 0;
    padding: 0;
  }

  #wikifoot {
    padding: 2px;
    background: transparent;
    border-top: 1px solid #999999;
  }

  img,
  table,
  blockquote,
  pre {
    break-inside: avoid;
  }

  h1,
  h2,
  h3 {
    break-after: avoid;
  }
}
