:root {
  color-scheme: light dark;
  --bg: #fafafa;
  --fg: #12121c;
  --accent: rgb(123, 96, 53);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12121c;
    --fg: #fafafa;
    --accent: rgb(205, 171, 63);
  }
}
:root[data-theme=light] {
  --bg: #fafafa;
  --fg: #12121c;
  --accent: rgb(123, 96, 53);
}
:root[data-theme=dark] {
  --bg: #12121c;
  --fg: #fafafa;
  --accent: rgb(205, 171, 63);
}

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

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

body {
  color: var(--fg);
  background: var(--bg);
}

button {
  border: none;
  border-radius: 4px;
  color: var(--bg);
  background: var(--fg);
}

a {
  color: var(--accent);
  text-decoration-line: underline;
  font-weight: normal;
}
a:hover {
  color: var(--fg);
}

.icon {
  display: inline-block;
  height: 1cap;
}

* {
  box-sizing: border-box;
}

:root {
  font-family: Arial, Helvetica, sans-serif;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-flow: column nowrap;
  min-height: 100vh;
}

#root {
  flex-grow: 1;
  display: grid;
  overflow: auto;
  width: 100%;
  grid-template-areas: "main" ".   " "foot";
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr auto;
}

#header,
#sidebar,
#root > * {
  background: var(--bg);
  padding: 1em;
}

#content,
#footer {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
}

#header {
  position: sticky;
  top: 0;
  padding-bottom: 0;
}
#header > div:first-child {
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
}
#header > div:last-child {
  margin-top: 1em;
  height: 0;
}

#footer {
  grid-area: foot;
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 0;
}

#content {
  grid-area: main;
}

#sidebar {
  position: absolute;
  max-width: 300px;
  height: max-content;
  border: 1px solid var(--fg);
  border-radius: 8px;
  font-size: min(1.5em, 24px);
}
#sidebar > * {
  display: block;
  text-decoration: none;
  line-height: 32px;
}

:root.sidebar-open #sidebar {
  position: relative;
  top: 0;
}

:root:not(.sidebar-open) #sidebar {
  display: none;
}

.huge-butt {
  font-family: sans-serif;
  display: inline-block;
  padding: 4px;
  width: 42px;
  height: 42px;
  font-size: 21px;
  cursor: pointer;
}

.borgir {
  height: 42px;
  width: 42px;
  display: inline-flex;
  flex-flow: column nowrap;
  justify-content: center;
  gap: 8px;
}

.borgir > * {
  width: 100%;
  border-bottom: 3px solid var(--bg);
  height: 1px;
}
