:root {
  --w-min: 400px;
  --w-max: 700px;
  --bg1: oklch(0.85 0.0197 311.86);
  --bg2: oklch(92.486% 0.03664 17.677);
  --io: oklch(0.569 0.19394 3.901);
  --fg1: oklch(23.426% 0.00374 106.801);
  --fg2: oklch(0.1076 0 0);
  --fg-inverse: oklch(0.9039 0 0);
  --sh: oklch(90.097% 0.03692 310.364);
  --stroke: oklch(93.283% 0.02625 58.16);
  --shade-hard: oklch(93.024% 0.01971 17.219 / 0.95);
  --shade: oklch(0.9 0.004 308.29 / 20%);
  --border: oklch(1 0 0 / 25%);
  --accent: #990049;
  --accent-fg: oklch(0.9054 0.0455 309.91);
  --accent-sh: #000000a0;
}
:root[data-dark="true"] {
  --bg1: oklch(0.2916 0.0197 311.86);
  --bg2: #27364f;
  --io: oklch(90.587% 0.08283 328.121);
  --fg1: oklch(0.9037 0 0);
  --fg2: oklch(90.851% 0.03973 310.167);
  --fg-inverse: oklch(0.1076 0 0);
  --sh: oklch(20.149% 0.01085 311.883);
  --stroke: oklch(0.2674 0.0049 39.4);
  --shade-hard: oklch(0.2538 0.004 308.29 / 95%);
  --shade: oklch(0.2538 0.004 308.29 / 25%);
  --border: oklch(0 0 0 / 25%);
}

@font-face {
  font-family: JournalFont;
  src: url('../fonts/marlboro.regular.ttf') format('truetype');
}
@font-face {
  font-family: ArticleFont;
  src: url('../fonts/playfair-display.regular.ttf') format('truetype');
}

.journal-font {
  font-family: JournalFont, "Georgia", serif;
  color: var(--fg2);
  text-shadow: 1px 3px var(--sh);
}
#tag {
  font-family: ArticleFont, "Georgia", serif;
}

html::before {
  content:"";
  position:fixed; inset:0; z-index:-1; pointer-events:none;

  background:
    radial-gradient(
      ellipse 100% 100% at 50% 0%,
      var(--bg2) 0%,
      var(--bg1) 60%, var(--bg1) 100%
    ),
    var(--bg1);

  /* keep it out of main paint work */
  will-change: transform;
  transform: translateZ(0);
  contain: paint;
  image-rendering:auto;
  backface-visibility:hidden;
}

body {
  font-family: Verdana;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
  height: max-content;
  padding: 0;
  margin: 0;
  color: var(--fg2);
}
#main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-grow: 1;
  margin: auto;
}
#main h3 {
  font-size: 2.4em;
  font-weight: normal;
  margin: 0 auto;
  width: 100%;
  text-align: left;
  line-height: 0.9em;
}
#main h3 a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  z-index: 1;
}
#main aside {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-items: space-between;
  line-height: 1em;
  margin: 0 auto;
  width: 100%;
}
#main aside .tags {
  white-space: nowrap;
  flex-wrap: initial;
}
#readme {
  font-size: 1.2em;
  font-family: ArticleFont !important;
  margin: 0 auto;
  text-align: justify;
}
#authors {
  display: flex;
  flex-direction: row;
  /* gap: 1em; */
  justify-content: center;
  place-items: top;
  margin: 1em 0;
}
#authors h2 {
  cursor: auto;
  width: fit-content;
  font-family: ArticleFont, "Times New Roman", times, serif;
  font-size: 2em;
}
.contacts {
  display: flex;
  flex-direction: row;
  justify-content: center;
  padding-bottom: 1em;
  margin: 0 auto 1em;
  border-bottom: 1px solid var(--fg2);
}
.piece-list {
  display: flex;
  flex-direction: row;
  gap: 1em;
}
.piece-list .size {
  width: 8em;
}
.piece-list > [data-kind] {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: min-content;
  gap: 2px;
}
.history-piece {
  display: grid;
  grid-template-columns: auto 1fr; /* rail | heading */
  align-items: start;
  column-gap: .75rem;
  row-gap: 2px;
}
#scroll-top {
  z-index: 4;
  position: fixed;
  width: 100%;
  top: 0;
  display: flex;
  height: 80px;
  background-color: var(--shade-hard);
  border-bottom: 1px solid var(--border);
  flex-direction: row-reverse;
  align-items: center;
}
#preferences-toggle {
  border: none;
  background: none;
  appearance: none;
}
:root[data-dark="true"] #preferences-toggle img {
  filter: invert(1) brightness(2);
}
#preferences-toggle,
#preferences label {
  flex-shrink: 0;
  align-self: center;
}
#preferences {
  z-index: 10;
  color: var(--fg2);
  margin: 0;
}

/* Title */
#title-stack {
  position: relative;
  z-index: 1;
  transition: padding-bottom 0.5s ease-in-out;
  white-space: nowrap;
  background-color: var(--shade);
  border-bottom: 1px solid var(--border);
}
#title, #title-stroke {
  z-index: 5;
  position: absolute;
  text-shadow: none;
  text-stroke: .2em transparent;
  -webkit-text-stroke: .2em transparent;
  transition: font-size 0.5s ease-in-out;
}
#title-stroke {
  z-index: 2;
  text-stroke-color: var(--stroke);
  -webkit-text-stroke-color: var(--stroke);
  mix-blend-mode: saturation;
}
#license {
  white-space: initial;
}
#replication {
  text-transform: uppercase;
  text-align: center;
  font-weight: bold;
  text-shadow: 0 2px var(--sh) !important;
  font-family: ArticleFont, "Times New Roman", times, serif;
  transition: margin-top 0.5s ease-in-out;
  margin-bottom: 1em;
}
#robots {
  margin: auto;
}
.truthy-pill {
  width: 60px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(to right,
    var(--shade-hard) 50%, var(--shade-hard) 50%);
  border: 1px solid var(--fg-inverse);
  margin: 1em 0 1.8em;
  font-size: 1em;
  color: var(--io);
  font-weight: lighter;
  display: grid;
  position: relative;
  place-items: center;
}
.truthy-pill::before {
  grid-area: 1 / 1;
  margin-top: 0.7em;
}

.truthy-pill[data-public="true"] {
  background: linear-gradient(to right,
    var(--shade-hard) 50%, green 50%);
}
.truthy-pill[data-public="true"]::before {
  content: "Listed"
}

.truthy-pill[data-public="false"] {
  background: linear-gradient(to right,
    red 50%, var(--shade-hard) 50%);
}
.truthy-pill[data-public="false"]::before {
  content: "Unlisted"
}

code {
  font-size: 1.2em;
  background-color: var(--accent);
  padding: .2em .4em;
  color: var(--accent-fg);
  text-shadow: 1px 3px var(--accent-sh);
}

/* Horizontal link strip */
.links {
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
  gap: 0 35px;
  font-size: 1.2em;
  padding: 3px 0;
  margin-bottom: 2rem;
  border: 0;
  /* border-bottom: 2px solid oklch(71.583% 0.04787 313.133); */
  /* border-top: 2px solid oklch(71.583% 0.04787 313.133 / 25%); */
  /* background-color: oklch(71.583% 0.04787 313.133 / 65%); */
}
/* :root[data-dark="true"] .links {
  border-bottom: 2px solid oklch(0.3526 0.0414 241.4);
  border-top: 2px solid oklch(0.3526 0.0414 241.4 / 25%);
  background-color: oklch(0.3526 0.0414 241.4 / 83.53%);
} */

.links > div {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.links button,
.links a {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  padding: 0;
}
.links span {
  color: var(--fg2);
}
.links a:not(:hover) {
  text-decoration: none;
}
.links img {
  filter: drop-shadow(0 2px 0px #000000);
}
.links img,
.group-label {
  display: flex !important;
}

/* Content */
.content {
  min-width: var(--w-min);
  max-width: var(--w-max);
  margin: 20px auto;
}
.content {
  line-height: 1.8em;
}
.content pre {
  color: var(--io);
  white-space: pre-wrap;
}

/* Footer */
#footer {
  background-color: var(--shade);
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--fg2);
  font-size: 0.8em;
}
#footer > div, #footer > nav {
  padding: 0.5em;
}
#footer img {
  margin-top: 1em;
}

/* Accessibility */

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