/* https://www.joshwcomeau.com/css/custom-css-reset/ */
*,
*::before,
*::after {
  box-sizing: border-box;
}
/* Remove default margin */
* {
  margin: 0;
}
/* Improve media defaults */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}
/* Remove built-in form typography styles */
input,
button,
textarea,
select,
pre,
code {
  font: inherit;
}
/* Avoid text overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid var(--border-color);
  margin: 1rem 0;
  padding: 0;
}

input,
select {
  vertical-align: middle;
}

/* www.automatisch.cc */
/* font-face courier code */
@font-face {
  font-family: "Courier Code";
  src: url("/static/font/couriercode/CourierCode-Bold.woff2") format("woff2"),
    url("/static/font/couriercode/CourierCode-Bold.woff") format("woff");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Courier Code";
  src: url("/static/font/couriercode/CourierCode-Roman.woff2") format("woff2"),
    url("/static/font/couriercode/CourierCode-Roman.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Courier Code";
  src: url("/static/font/couriercode/CourierCode-BoldItalic.woff2") format("woff2"),
    url("/static/font/couriercode/CourierCode-BoldItalic.woff") format("woff");
  font-weight: bold;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Courier Code";
  src: url("/static/font/couriercode/CourierCode-Italic.woff2") format("woff2"),
    url("/static/font/couriercode/CourierCode-Italic.woff") format("woff");
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}

:root {
  --ff: "Courier Code", "Courier 10 Pitch", "Courier New", "Courier Prime", "Cousine", Courier, monospace;
  --gap: 1rem;
  --col: 25rem;
}

/* a11y */
@keyframes smoothscroll1 {
  from,
  to {
    scroll-behavior: smooth;
  }
}

@keyframes smoothscroll2 {
  from,
  to {
    scroll-behavior: smooth;
  }
}

html {
  animation: smoothscroll1 1s;
}

html:focus-within {
  animation-name: smoothscroll2;
  scroll-behavior: smooth;
}

svg {
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  color: var(--foreground);
  background: var(--background);
  font: normal 1rem/1.35 var(--ff);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.visually-hidden,
.visually-hidden-focusable:not(:focus):not(:focus-within) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-higher);
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* In dem Fall passt, aber allgemein sollte man die CSS-Klassen, nicht die IDs gestalten */
#cursor {
  transition: 0.1s;
}

/* Layout */
html,
body,
.wrapper {
  height: 100%;
}

.wrapper {
  grid-template-rows: auto 1fr auto;
  gap: var(--gap);
  height: 100%;
  --gutter-x: 1.5rem;
  --gutter-y: 0;
}

.wrapper > main {
  height: 100%;
}

.container {
  width: 100%;
  max-width: 100%;
  padding-right: var(--gap);
  padding-left: var(--gap);
  margin-right: auto;
  margin-left: auto;
}

@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }
}
@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
}
@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
}

.grid {
  display: grid;
  gap: var(--gap) calc(var(--gap) * 2);
  align-content: flex-start;
}

.grid-auto {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--col)), 1fr));
}

.grid-reset {
  grid-column: -1/1;
}

/* Header */
.wrapper > header {
  padding-top: var(--gap);
}

.wrapper > header h1 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.wrapper > header h1 a {
  text-indent: -800%;
  position: relative;
  display: inline-block;
  overflow: hidden;
  height: 64px;
  width: 183px;
  background: transparent url(/static/img/autom_logo_001.png) -12px center no-repeat;
  margin-right: var(--gap);
}

/* Inhalte */
.wrapper > main > header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: var(--gap);
}

main > header > form::after {
  content: "|";
  display: inline-block;
  margin-right: var(--gap);
}

article {
  padding-bottom: var(--gap);
}

article:not(:last-child) {
  border-bottom: 1px solid var(--border-color);
}

/* Footer */
.wrapper > footer {
  padding-top: calc(var(--gap) * 0.5);
  padding-bottom: calc(var(--gap) * 0.5);
}

.wrapper > footer ul {
  list-style: none outside;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
}

.wrapper > footer li:not(:last-child)::after {
  content: "|";
  display: inline-block;
  margin-right: var(--gap);
  padding-left: var(--gap);
}

/* Code */
.hinw-lang {
  padding-top: var(--gap);
  padding-bottom: var(--gap);
}

pre {
  border: 1px solid var(--border-color);
}

p > code,
dd > code {
  background-color: var(--background-higher);
  border: 1px solid var(--border-color);
  padding: 0.2rem 0.2rem 0 0.2rem;
  border-radius: 0.2rem;
}

/* Typographie */
em,
i {
  font-style: italic;
}

strong,
b,
.title {
  font-weight: 600;
}

h6,
h5,
h4,
h3,
h2,
h1 {
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

h1 {
  font-size: calc(1.375rem + 1.5vw);
}
@media (min-width: 1200px) {
  h1 {
    font-size: 2.5rem;
  }
}

h2 {
  font-size: calc(1.325rem + 0.9vw);
}
@media (min-width: 1200px) {
  h2 {
    font-size: 2rem;
  }
}

h3 {
  font-size: calc(1.3rem + 0.6vw);
}
@media (min-width: 1200px) {
  h3 {
    font-size: 1.75rem;
  }
}

h4 {
  font-size: calc(1.275rem + 0.3vw);
}
@media (min-width: 1200px) {
  h4 {
    font-size: 1.5rem;
  }
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-top: 0;
}

/* Detailseite */
.langtext h1,
.langtext h2,
.langtext h3,
.langtext h4 {
  hyphens: auto;
}

.langtext p,
.langtext pre,
.langtext dl > dd {
  margin-bottom: var(--gap);
}

/* Titel eines Hinweises */
.titel {
  font-weight: 600;
}

/* Aktiver Tag-Filter */
.filter {
  font-weight: 600;
}

/* Definition Lists */

dl {
  margin-bottom: var(--gap);
}

dl > dt {
  font-weight: 600;
}

dl > dd {
  margin-left: var(--gap);
}

blockquote {
  margin-left: var(--gap);
  margin-right: var(--gap);
  /* margin-top: var(--gap); */
  /* margin-bottom: var(--gap); */
  font-style: italic;
}

@media only screen and (max-width: 800px) {
  h1.automatisch-titel {
    font-size: 1.3rem;
  }
}
