:root {
  color-scheme: light;
  --accent: #087a35;
  --accent-dark: #075d2a;
  --border: #d7ddd9;
  --muted: #66706a;
  --paper: #ffffff;
  --page: #eef1ef;
  --text: #202522;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--page);
  font: 16px/1.55 Georgia, "Times New Roman", serif;
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover,
a:focus-visible {
  color: #9a3f00;
}

img,
svg {
  max-width: 100%;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 10;
  padding: 0.65rem 0.9rem;
  color: #fff;
  background: #111;
}

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

.site-header {
  border-bottom: 4px solid var(--accent);
  background: var(--paper);
}

.site-header__inner {
  width: min(100% - 2rem, 1240px);
  margin: 0 auto;
  padding: 1rem 0;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  width: min(470px, 100%);
  text-decoration: none;
}

.site-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.site-shell {
  display: grid;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
  gap: 1.5rem;
  width: min(100% - 2rem, 1240px);
  margin: 1.5rem auto;
  align-items: start;
}

.site-sidebar,
#dokuwiki__content {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--paper);
  box-shadow: 0 1px 3px rgb(0 0 0 / 7%);
}

.site-sidebar {
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow: auto;
}

.site-sidebar summary {
  padding: 0.8rem 1rem;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  font: 700 0.95rem/1.2 system-ui, sans-serif;
}

#dokuwiki__aside {
  padding: 0.35rem 1rem 1rem;
  font-family: system-ui, sans-serif;
  font-size: 0.84rem;
  line-height: 1.35;
}

#dokuwiki__aside .toggle {
  display: none;
}

#dokuwiki__aside h3 {
  margin: 1rem 0 0.35rem;
  color: var(--accent-dark);
  font-size: 0.95rem;
}

#dokuwiki__aside ul {
  margin: 0;
  padding-left: 1rem;
}

#dokuwiki__aside li {
  margin: 0.2rem 0;
}

#dokuwiki__aside a {
  text-decoration: none;
}

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

#dokuwiki__content {
  min-width: 0;
}

#dokuwiki__content > .pad {
  padding: clamp(1.1rem, 3vw, 2.6rem);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #16251c;
  font-family: system-ui, sans-serif;
  line-height: 1.2;
  scroll-margin-top: 1rem;
}

h1 {
  margin: 0 0 1.2rem;
  padding-bottom: 0.45rem;
  border-bottom: 3px solid var(--accent);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h2 {
  margin-top: 2rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border);
  font-size: 1.5rem;
}

h3 {
  margin-top: 1.6rem;
  font-size: 1.22rem;
}

h4 {
  margin: 1.35rem 0 0.55rem;
  font-size: 1.06rem;
}

p,
ul,
ol,
dl,
blockquote,
pre,
table {
  margin-top: 0.8rem;
  margin-bottom: 0.8rem;
}

ul,
ol {
  padding-left: 1.5rem;
}

li + li {
  margin-top: 0.25rem;
}

blockquote {
  margin-left: 0;
  padding: 0.2rem 1rem;
  border-left: 4px solid var(--accent);
  color: #3b463f;
  background: #f6faf7;
}

.table,
.wrap_table {
  max-width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}

th,
td {
  padding: 0.45rem 0.55rem;
  border: 1px solid #cdd4cf;
  text-align: left;
  vertical-align: top;
}

th {
  color: #fff;
  background: var(--accent-dark);
  font-family: system-ui, sans-serif;
}

tbody tr:nth-child(even) {
  background: #f3f6f4;
}

#dw__toc {
  float: right;
  width: min(19rem, 45%);
  margin: 0 0 1.2rem 1.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  background: #f7faf8;
  font: 0.86rem/1.4 system-ui, sans-serif;
}

#dw__toc .toggle {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.tocheader {
  font-weight: 700;
}

#dw__toc ul.toc {
  margin: 0.35rem 0;
  padding-left: 1rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2rem, 1240px);
  margin: 0 auto 2rem;
  color: var(--muted);
  font: 0.88rem/1.4 system-ui, sans-serif;
}

.site-footer a {
  text-decoration: none;
}

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

.clearer,
.editbutton_section,
.secedit {
  display: none;
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

pre {
  max-width: 100%;
  padding: 0.85rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  background: #f6f7f6;
}

@media (max-width: 820px) {
  .site-shell {
    grid-template-columns: 1fr;
    margin-top: 1rem;
  }

  .site-sidebar {
    position: static;
    max-height: none;
  }

  #dw__toc {
    float: none;
    width: 100%;
    margin: 0 0 1.2rem;
  }
}

@media print {
  body {
    background: #fff;
    font-size: 11pt;
  }

  .site-header,
  .site-sidebar,
  .site-footer,
  .skip-link,
  #dw__toc {
    display: none !important;
  }

  .site-shell {
    display: block;
    width: 100%;
    margin: 0;
  }

  #dokuwiki__content {
    border: 0;
    box-shadow: none;
  }

  #dokuwiki__content > .pad {
    padding: 0;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}
