/* edaha.md's default theme: system fonts, readable widths, light and dark colours. Replace it with your own static/site.css */
:root {
  color-scheme: light dark;
  --colour-text: #1d1d1f;
  --colour-muted: #5a5a60;
  --colour-background: #ffffff;
  --colour-surface: #f4f4f6;
  --colour-border: #d8d8de;
  --colour-link: #bc4501;
  --colour-link-hover: #db5a10;
  --colour-focus: #db5a10;
  --font-size-base: 16px;
  --font-size-title: 48px;
  --font-size-h1: 32px;
  --font-size-h2: 28px;
  --font-size-h3: 24px;
  --font-size-h4: 20px;
  --font-size-h5: 18px;
  --font-size-h6: 16px;
}

/* Dark colours: the device's choice unless the theme switcher chose light, or the theme switcher's choice */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --colour-text: #ececf0;
    --colour-muted: #a6a6ae;
    --colour-background: #141416;
    --colour-surface: #1f1f23;
    --colour-border: #38383f;
    --colour-link: #dc6d2c;
    --colour-link-hover: #fda26d;
    --colour-focus: #fda26d;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --colour-text: #ececf0;
  --colour-muted: #a6a6ae;
  --colour-background: #141416;
  --colour-surface: #1f1f23;
  --colour-border: #38383f;
  --colour-link: #dc6d2c;
  --colour-link-hover: #fda26d;
  --colour-focus: #fda26d;
}

:root[data-theme="light"] {
  color-scheme: light;
}

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

body {
  margin: 0;
  background: var(--colour-background);
  color: var(--colour-text);
  font-family: Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

a {
  color: var(--colour-link);
}

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

a:focus-visible,
button:focus-visible,
.button:focus-visible {
  outline: 3px solid var(--colour-focus);
  outline-offset: 2px;
}

h1 {
  font-size: var(--font-size-h1);
}

h2 {
  font-size: var(--font-size-h2);
}

h3 {
  font-size: var(--font-size-h3);
}

h4 {
  font-size: var(--font-size-h4);
}

h5 {
  font-size: var(--font-size-h5);
}

h6 {
  font-size: var(--font-size-h6);
}

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

pre {
  overflow-x: auto;
  padding: 1rem;
  background: var(--colour-surface);
}

code {
  background: var(--colour-surface);
  color: var(--colour-muted);
  font-size: 0.9em;
  padding: 0.2em;
}

/* Hidden on screen but read by screen readers, e.g. extra context for "Read more" links */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Raw content is shown as it is written: in the page's own font, keeping its spaces and line breaks */
.raw {
  font: inherit;
  white-space: pre-wrap;
}

pre.raw {
  padding: 0;
  background: none;
}

table {
  border-collapse: collapse;
}

th,
td {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--colour-border);
}

aside {
  color: var(--colour-muted);
}

/* Switches between the light and dark theme (see theme-switcher.js) */
.theme-switcher {
  padding: 0.25rem;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.button {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--colour-border);
  border-radius: 0.375rem;
  background: var(--colour-surface);
  color: var(--colour-text);
  text-decoration: none;
}

.button:hover {
  border-color: var(--colour-link);
  color: var(--colour-text);
}

.site-header,
.site-content,
.site-footer {
  max-width: 64rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

.site-header {
  padding-block: 1rem;
  border-bottom: 1px solid var(--colour-border);
}

.site-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.site-content {
  display: grid;
  gap: 2rem;
  padding-block: 1.5rem;
}

@media (min-width: 48rem) {
  .site-content:has(> aside) {
    grid-template-columns: 1fr 16rem;
  }
}

.site-main {
  min-width: 0;
}

.site-content > aside dt {
  font-weight: 700;
}

.site-content > aside dd {
  margin: 0 0 0.75rem;
}

.site-breadcrumb ul {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--colour-muted);
  font-size: 0.9375rem;
}

.site-breadcrumb li + li::before {
  content: "/";
  margin-inline: 0.5rem;
}

.site-breadcrumb,
.site-breadcrumb a:link,
.site-breadcrumb a:visited {
  color: var(--colour-muted);
  text-decoration: none;
}

.site-breadcrumb a:hover,
.site-breadcrumb a:active,
.site-breadcrumb a[aria-current] {
  color: var(--colour-link-hover);
  text-decoration: none;
}

.article-meta,
.article-updated {
  color: var(--colour-muted);
  font-size: 0.9375rem;
}

.list-articles {
  margin: 0;
  padding: 0;
  list-style: none;
}

.list-article {
  display: flex;
  gap: 1rem;
  padding-block: 1.5rem;
}

.list-article + .list-article {
  border-top: 1px solid var(--colour-border);
}

.list-article .article-title {
  margin: 0;
}

.article-thumbnail img {
  width: 8rem;
}

nav[aria-label="Pages"] ul {
  display: flex;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}

.site-footer {
  padding-block: 1.5rem;
  border-top: 1px solid var(--colour-border);
  color: var(--colour-muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.colophon {
  font-size: 0.875rem;
}

.colophon a:link,
.colophon a:visited {
  color: var(--colour-muted);
  text-decoration: none;
}

.colophon a:hover,
.colophon a:active {
  color: var(--colour-link-hover);
  text-decoration: none;
}
