/* @link https://utopia.fyi/type/calculator?c=320,18,1.2,1240,20,1.25,5,2,&s=0.75|0.5|0.25,1.5|2|3|4|6,s-l&g=s,l,xl,12 */

:root {
  --step--2: clamp(0.7813rem, 0.7747rem + 0.0326vw, 0.8rem);
  --step--1: clamp(0.9375rem, 0.9158rem + 0.1087vw, 1rem);
  --step-0: clamp(1.125rem, 1.0815rem + 0.2174vw, 1.25rem);
  --step-1: clamp(1.35rem, 1.2761rem + 0.3696vw, 1.5625rem);
  --step-2: clamp(1.62rem, 1.5041rem + 0.5793vw, 1.9531rem);
  --step-3: clamp(1.944rem, 1.771rem + 0.8651vw, 2.4414rem);
  --step-4: clamp(2.3328rem, 2.0827rem + 1.2504vw, 3.0518rem);
  --step-5: clamp(2.7994rem, 2.4462rem + 1.7658vw, 3.8147rem);
}

:root {
  --stroke-width: 2px;

  --serif: Lora, Newsreader, Georgia, "Times New Roman", Times, serif;
  --sans: "Public Sans", "Source Sans 3", system-ui;
  --body-typeface: "Public Sans", var(--serif);

  --bg: hsl(0, 0%, 100%);
  --off-bg: hsl(0, 0%, 95%);
  --text: hsl(0, 0%, 30%);
  --faint-text: hsl(0, 0%, 46%);
  --accent-color: hsl(114, 30%, 38%);
}

:root {
  --bg-image-diagonal-lines: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23000000' fill-opacity='0.1' fill-rule='evenodd'%3E%3Cpath d='M5 0h1L0 6V5zM6 5v1H5z'/%3E%3C/g%3E%3C/svg%3E");
}

* {
  box-sizing: border-box;
}

body {
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1;
  margin: 0;
}

button,
input,
select,
textarea {
  background-color: transparent;
  font: inherit;
  font-family: var(--sans);
  border: var(--stroke-width) solid var(--faint-text);
  border-radius: 0;
  padding: 0.25em 0.5em;
}

a {
  color: var(--accent-color);
  text-decoration-color: var(--off-bg);
}

a:is(:focus, :hover) {
  text-decoration-color: currentColor;
  text-underline-offset: 2px;
}

time {
  color: var(--faint-text);
  font-family: var(--sans);
}

ol li::marker {
  color: var(--accent-color);
  font-family: var(--sans);
}

ul {
  list-style: square;
}

ul li::marker {
  color: var(--accent-color);
}

li+li {
  margin-block-start: 0.5em;
}

li ul {
  list-style: disc;
  margin-block-start: 0.25em;
}

li ul li ul {
  list-style: circle;
}

.prose>p:first-of-type:first-letter {
  /* Takes up three lines of text */
  font-size: 4.5em;
  font-weight: bold;
  float: inline-start;
  margin-block-start: -0.22em;
  margin-block-end: -0.3em;
  margin-inline-end: 0.1em;
}

h1,
h2,
h3,
h4 {
  font-family: var(--sans);
  margin-block: 0;
}

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

h2,
.heading-container:has(h2) {
  font-size: var(--step-1);
}

h3,
.heading-container:has(h3) {
  color: var(--faint-text);
  font-size: var(--step-0);
  font-weight: normal;
}

h4,
.heading-container:has(h4) {
  color: var(--faint-text);
  font-size: var(--step--1);
  font-weight: normal;
  letter-spacing: 0.1ch;
  text-transform: uppercase;
}

.heading-container {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5ch;
  margin-block-start: 2em;

  &+* {
    margin-block-start: 0.5rem;
  }

  &:not(:hover) a:not(:focus) {
    opacity: 0;
  }
}

blockquote {
  background: var(--off-bg);
  border-inline-start: var(--stroke-width) solid var(--accent-color);
  line-height: 1.1;
  margin-inline: 0;
  padding: 1em;
}

blockquote>*:first-child {
  margin-block-start: 0;
}

blockquote>*:last-child {
  margin-block-end: 0;
}

pre,
*:not(pre)>code,
kbd {
  background-color: var(--off-bg);
  padding: 1px 0.2ch;
  margin-inline: 0.2ch;
}

kbd {
  border-block-end: var(--stroke-width) solid var(--faint-text);
  border-radius: 0.2em;
  font-size: smaller;
}

/* Utility classes */
.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* Plugins & Web Components */

hr,
.footnotes-sep {
  background-color: var(--off-bg);
  border: none;
  height: var(--stroke-width);
  margin-block: 2rem;
}

bible-verse {
  display: block;
  font-family: var(--serif);
  position: relative;
  text-align: end;
}

bible-verse div {
  background: var(--off-bg);
  bottom: calc(100% + 0.5rem);
  border-block-end: var(--stroke-width) solid var(--accent-color);
  padding: 1rem;
  position: absolute;
  right: 0;
  width: 32ch;
}

bible-verse div b {
  font-family: var(--sans);
}

call-out {
  --call-out_icon-color: var(--accent-color);
  align-items: center;
  background-color: var(--off-bg);
  border: var(--stroke-width) solid var(--accent-color);
  display: flex;
  gap: 1rem;
  margin-block: 1rem;
  padding: 1em;
}

call-out svg {
  height: 1.5rem;
}

call-out div {
  flex: 1;
}

call-out div>*:first-child {
  margin-block-start: 0;
}

call-out div>*:last-child {
  margin-block-end: 0;
}

/* Components */

.page-list {
  display: grid;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}

.page-list-item {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;

  & time {
    display: inline;
    font-size: var(--step--2);
  }
}

table {
  border-collapse: collapse;
  margin-block: var(--step-1);
  width: 100%;

  td,
  th {
    padding: 0.25em;
  }

  thead {
    background-color: var(--text);
    color: var(--bg);
  }

  tbody tr:nth-child(even) {
    background-color: var(--off-bg);
  }
}