@font-face {
  font-family: "Barlow Condensed";
  font-weight: 500;
  font-display: swap;
  src: url("/font/barlow-condensed-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow Condensed";
  font-weight: 600;
  font-display: swap;
  src: url("/font/barlow-condensed-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Literata";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("/font/literata-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Literata";
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  src: url("/font/literata-latin-400-italic.woff2") format("woff2");
}

@font-face {
  font-family: "Literata";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("/font/literata-latin-600-normal.woff2") format("woff2");
}

:root {
  color-scheme: light dark;
  --paper: #e8ebe4;
  --panel: #f3f5ef;
  --ink: #17211f;
  --quiet: #536059;
  --rule: #c2cac1;
  --link: #0d5560;
  --spring: #86b373;
  --summer: #dfb23a;
  --autumn: #b9482f;
  --winter: #6a8fb3;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --text: "Literata", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111918;
    --panel: #19221f;
    --ink: #e2e8e1;
    --quiet: #93a19a;
    --rule: #2c3a36;
    --link: #6cc3c9;
    --spring: #6b9759;
    --summer: #c49a26;
    --autumn: #cf6248;
    --winter: #5b83a9;
  }
}

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

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 100%;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.05;
  margin: 0;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  letter-spacing: 0.01em;
}

h2 {
  font-size: 1.7rem;
  margin: 2.4rem 0 0.6rem;
}

h3 {
  font-size: 1.3rem;
  margin: 1.4rem 0 0.3rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

code,
pre,
time,
.length,
.at,
.count {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.05em;
  letter-spacing: 0.02em;
}

pre {
  white-space: pre-wrap;
  margin: 0.4rem 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.none {
  color: var(--quiet);
  font-style: italic;
}

.mark {
  display: inline-block;
  padding: 0 0.45em;
  border: 1px solid var(--quiet);
  border-radius: 0.2em;
  color: var(--quiet);
  font-family: var(--display);
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.5;
  vertical-align: 0.15em;
}

.plain {
  color: var(--quiet);
}

meter {
  appearance: none;
  display: block;
  width: 100%;
  height: 0.5rem;
  border: 0;
  background: var(--rule);
}

meter::-webkit-meter-bar {
  height: 0.5rem;
  border: 0;
  border-radius: 0;
  background: var(--rule);
}

meter::-webkit-meter-optimum-value,
meter::-webkit-meter-suboptimum-value,
meter::-webkit-meter-even-less-good-value {
  background: var(--ink);
  border-radius: 0;
}

meter::-moz-meter-bar {
  background: var(--ink);
}

main.week,
main.season,
main.transcript,
main.entry,
main.marks,
main:not([class]) {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2.5rem 1rem 5rem;
}

main.week,
main.marks {
  max-width: 90rem;
}

main.week > header,
main.week > section.themes,
main.week > p.open {
  max-width: 46rem;
}

main > header .dates,
main > header .week-id,
main > header .meta {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--quiet);
  margin-top: 0.3rem;
}

nav.seasons,
nav.sibling,
header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.2rem;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 500;
  margin-top: 0.7rem;
}

main > section,
main .topics {
  border-top: 1px solid var(--rule);
  margin-top: 2.2rem;
}

main > section > h2:first-child {
  margin-top: 1rem;
}

section ul {
  list-style: none;
  padding: 0;
}

section.themes {
  background: var(--panel);
  border-top: 0;
  padding: 0.3rem 1.2rem 1.1rem;
  margin-top: 1.8rem;
}

section.themes article h2 {
  margin: 0.8rem 0 0.2rem;
}

section.themes article p {
  margin: 0.2rem 0 0;
}

.calendar {
  overflow-wrap: anywhere;
  --hour: 3rem;
  margin-top: 2.2rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9rem;
}

.calendar .corner,
.calendar .hour,
.calendar .cut,
.calendar .cell:empty {
  display: none;
}

.calendar .day-head {
  border-top: 1px solid var(--rule);
  padding: 1rem 0 0.3rem;
}

.calendar .day-head h2 {
  margin: 0;
  font-size: 1.2rem;
}

.calendar .day-head .date {
  color: var(--quiet);
  font-weight: 500;
}

p.sentence {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  line-height: 1.4;
}

.calendar p.sentence {
  margin: 0.05rem 0 0.3rem;
}

.calendar .cell {
  padding: 0.1rem 0;
}

.calendar ol.entries {
  list-style: none;
  padding: 0;
  margin: 0;
}

.calendar ol.entries > li {
  padding: 0.2rem 0.1rem;
}

.calendar li[style] {
  min-height: calc(min(var(--len), 3) * var(--hour));
  border-left: 2px solid var(--rule);
  padding-left: 0.4rem;
}

.calendar time.at {
  color: var(--quiet);
  font-variant-numeric: tabular-nums;
}

.calendar h3 {
  margin: 0.1rem 0 0;
  font-size: 0.95rem;
}

.calendar .count {
  color: var(--quiet);
  font-weight: 400;
}

.calendar li.audio .meta,
.calendar li.chat .meta,
.calendar li.article .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.7rem;
  margin: 0.1rem 0 0;
  color: var(--quiet);
}

.calendar li.commit {
  gap: 0 0.4rem;
}

.calendar li.commit time,
.calendar li.commit code {
  min-width: 0;
}

.calendar li.commit .text {
  flex-basis: 100%;
}

.calendar li.commit details {
  margin-left: 0;
}

.calendar ul.commits {
  padding-left: 0;
  list-style: none;
}

.mark-kind {
  font-variant-emoji: text;
  color: transparent;
  text-shadow: 0 0 0 var(--ink);
}

ul.commits {
  margin: 0.2rem 0 0;
}

article.topic {
  margin-bottom: 1.4rem;
}

article p:last-child {
  margin-bottom: 0;
}

p.count {
  color: var(--quiet);
}

li.commit {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.8rem;
  padding: 0.25rem 0;
}

li.commit time {
  min-width: 2.8rem;
  color: var(--quiet);
  font-variant-numeric: tabular-nums;
}

li.commit code {
  min-width: 5.2rem;
}

li.commit .text {
  flex: 1 1 18rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

li.commit details {
  flex-basis: 100%;
  margin-left: 3.6rem;
}

details summary {
  cursor: pointer;
  color: var(--link);
  font-family: var(--display);
  font-weight: 500;
}

details.more {
  margin-top: 0.4rem;
}

p.open {
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
  margin-top: 2.2rem;
  color: var(--quiet);
}

section.weeks li {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr) 2.5rem;
  align-items: center;
  gap: 0 1rem;
  padding: 0.2rem 0;
  font-family: var(--display);
  font-size: 1.15rem;
}

section.weeks .count {
  text-align: right;
}

section.repos li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 1rem;
  padding: 0.3rem 0;
}

p.weeks {
  font-family: var(--display);
  font-weight: 500;
  color: var(--quiet);
}

p.piece {
  margin-bottom: 1.1rem;
}

main.entry > header p.source {
  font-family: var(--display);
  font-weight: 500;
  overflow-wrap: anywhere;
  margin: 0.3rem 0 0;
}

main.entry .entry-body {
  margin-top: 2rem;
}

main.entry .entry-body pre {
  overflow-x: auto;
  white-space: pre;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--rule);
}

main.entry .entry-body blockquote {
  margin: 0 0 1rem;
  padding-left: 1rem;
  border-left: 2px solid var(--rule);
  color: var(--quiet);
}

main.entry .entry-body h2 {
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
  margin-top: 2rem;
}

main.entry .entry-body table {
  border-collapse: collapse;
}

main.entry .entry-body th,
main.entry .entry-body td {
  border: 1px solid var(--rule);
  padding: 0.2rem 0.6rem;
}

p.piece .at {
  color: var(--quiet);
  margin-right: 0.4rem;
}

main.marks table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

main.marks th,
main.marks td {
  text-align: left;
  vertical-align: top;
  padding: 0.35rem 0.8rem 0.35rem 0;
  border-bottom: 1px solid var(--rule);
}

main.marks th {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
}

main.index {
  --gap: clamp(0.5rem, 1.1vw, 1rem);
  height: 100vh;
  height: 100dvh;
  max-width: none;
  margin: 0;
  padding: var(--gap) calc(var(--gap) * 1.5);
  display: grid;
  grid-template-rows: auto minmax(0, 3fr) auto minmax(0, 3fr) auto;
  gap: var(--gap);
  overflow: hidden;
}

.masthead h1 {
  font-size: 2.2rem;
  line-height: 1;
}

.strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: var(--gap);
  min-height: 0;
  margin: 0;
  border: 0;
}

.tile {
  --hue: var(--quiet);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 0.9rem 1rem;
  color: var(--ink);
  text-decoration: none;
  background: color-mix(in oklab, var(--hue) 20%, var(--panel));
  border-top: 0.45rem solid var(--hue);
}

.tile:hover {
  background: color-mix(in oklab, var(--hue) 34%, var(--panel));
}

.tile:focus-visible,
.spine:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
}

.tile h2 {
  margin: 0;
  font-size: clamp(1.5rem, 1.9vw, 2.2rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile .dates {
  margin: 0.2rem 0 0.8rem;
  color: var(--quiet);
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 500;
}

.tile ul {
  margin: 0;
  padding: 0;
  list-style: none;
  min-height: 0;
}

.tile .line {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
  line-height: 1.55;
}

.tile .none {
  margin: 0;
  font-size: 0.92rem;
}

.spring {
  --hue: var(--spring);
}

.summer {
  --hue: var(--summer);
}

.autumn {
  --hue: var(--autumn);
}

.winter {
  --hue: var(--winter);
}

.shelf {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  height: clamp(5.2rem, 17vh, 8.5rem);
  min-height: 0;
  margin: 0;
  border: 0;
}

.spine {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0.5rem 0;
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  background: color-mix(in oklab, var(--hue) 20%, var(--panel));
  border-bottom: 0.35rem solid var(--hue);
}

.spine span {
  writing-mode: vertical-rl;
  max-height: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1;
}

.spine:hover {
  background: color-mix(in oklab, var(--hue) 40%, var(--panel));
}

.lower {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: calc(var(--gap) * 2);
  min-height: 0;
  overflow: hidden;
}

.lower > section {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  margin: 0;
  border-top: 1px solid var(--rule);
  padding-top: 0.5rem;
}

.lower h2 {
  margin: 0 0 0.3rem;
  font-size: 2.4rem;
}

.latest {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-content: start;
  column-gap: 3rem;
}

.latest .items {
  min-width: 0;
  padding-top: 0.6rem;
}

.latest .dates {
  margin: 0 0 0.6rem;
  color: var(--quiet);
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 500;
}

.figures {
  display: flex;
  gap: 2rem;
  margin: 0 0 0.6rem;
}

.figures div {
  display: flex;
  flex-direction: column-reverse;
}

.figures dd {
  margin: 0;
  font-family: var(--display);
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1;
}

.figures dt {
  color: var(--quiet);
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 500;
}

.latest .repos {
  margin: 0 0 0.6rem;
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  overflow: hidden;
  white-space: nowrap;
}

.latest .titles {
  margin: 0;
  padding: 0;
}

.latest .titles li {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top h2 {
  font-size: 1.7rem;
  margin-bottom: 0.5rem;
}

.top ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 0 var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.top li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3rem 1.8rem;
  align-items: center;
  gap: 0 0.5rem;
  padding: 0.12rem 0;
}

.top li code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top meter {
  width: 100%;
}

.top .count {
  text-align: right;
}

main.index footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.6rem;
  border-top: 1px solid var(--rule);
  padding-top: 0.4rem;
  color: var(--quiet);
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 500;
}

main.index footer p {
  margin: 0;
}

main.index footer .metrics {
  margin-left: auto;
  font-size: 0.85rem;
}

@media (max-width: 760px) {
  main.index {
    height: auto;
    overflow: visible;
    grid-template-rows: none;
  }

  .strip {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shelf {
    overflow-x: auto;
  }

  .spine {
    flex: 0 0 1.7rem;
  }

  .lower {
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
  }

  .latest {
    grid-template-columns: minmax(0, 1fr);
  }

  li.commit details {
    margin-left: 0;
  }

  section.weeks li {
    grid-template-columns: 5.5rem minmax(0, 1fr) 2rem;
  }

  main.marks table {
    display: block;
    overflow-x: auto;
  }
}

@media (min-width: 901px) {
  html:has(main.week) {
    height: 100%;
    overflow-y: hidden;
  }

  html:has(main.week) body {
    height: 100%;
  }

  main.week {
    --pad: 1rem;
    --head: 1.6rem;
    --row: calc((100dvh - 2 * var(--pad) - var(--head) - 1.5rem) / 7);
    --unit: 3.3rem;
    display: grid;
    grid-template-columns: 22rem max-content;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 1.2rem 2rem;
    width: max-content;
    height: 100%;
    max-width: none;
    margin: 0;
    padding: var(--pad) 1.5rem;
  }

  main.week > header {
    grid-area: 1 / 1;
  }

  main.week h1 {
    font-size: 2.4rem;
  }

  main.week > section.themes {
    grid-area: 2 / 1;
    align-self: start;
    max-height: 100%;
    overflow-y: auto;
    margin-top: 0;
    font-size: 0.9rem;
  }

  main.week > .calendar {
    grid-area: 1 / 2 / 3 / 3;
  }

  .calendar {
    display: grid;
    grid-template-columns: auto 18rem;
    grid-template-rows: var(--head) repeat(7, var(--row));
    line-height: 1.25;
    font-size: 0.85rem;
    align-content: start;
    --hour: 12rem;
    margin-top: 0;
  }

  .calendar .corner,
  .calendar .hour,
  .calendar .cut,
  .calendar .cell:empty {
    display: block;
  }

  .calendar .corner,
  .calendar .day-head {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--paper);
    box-shadow: 1px 0 0 var(--rule);
  }

  .calendar .corner {
    padding: 0.1rem 0.4rem 0 0;
    font-family: var(--display);
    font-weight: 600;
    white-space: nowrap;
  }

  .calendar .day-head {
    overflow: clip;
    padding: 0.4rem 0.3rem 0.3rem 0;
  }

  .calendar .day-head h2 {
    writing-mode: sideways-lr;
    text-align: end;
    font-size: 1rem;
    line-height: 1.15;
  }

  .calendar .day-head .weekday {
    display: block;
  }

  .calendar p.sentence {
    overflow: clip;
    margin: 0;
    padding: 0.4rem 0.8rem 0 0.6rem;
    border-top: 1px solid var(--rule);
    font-size: 0.8rem;
    line-height: 1.3;
  }

  .calendar .hour {
    border-left: 1px solid var(--rule);
    padding: 0.1rem 0.3rem 0;
    font-family: var(--display);
    font-weight: 500;
    color: var(--quiet);
    font-variant-numeric: tabular-nums;
  }

  .calendar .hour.regular {
    min-width: 2.5rem;
  }

  .calendar .cut {
    border-left: 1px dashed var(--rule);
    font-family: var(--display);
    font-size: 0.7rem;
    line-height: 1;
    color: var(--quiet);
    padding: 0.3rem 0.2rem;
    white-space: nowrap;
  }

  .calendar .cell {
    overflow: clip;
    border-top: 1px solid var(--rule);
    border-left: 1px solid var(--rule);
    padding: 0.15rem 0.3rem;
  }

  .calendar ol.entries,
  .calendar ol.entries > li.run {
    display: grid;
    grid-template-rows: repeat(auto-fill, var(--unit));
    grid-auto-flow: column;
    gap: 0.2rem 0.6rem;
    height: calc(var(--row) - 0.4rem);
  }

  .calendar ol.entries {
    grid-auto-columns: max-content;
  }

  .calendar ol.entries > li {
    overflow: clip;
    width: var(--hour);
    height: var(--unit);
    padding: 0.1rem 0.1rem 0;
  }

  .calendar ol.entries > li:not(.run) {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-content: start;
    column-gap: 0.35rem;
  }

  .calendar ol.entries > li[style] {
    min-height: 0;
    width: max(var(--hour), calc(min(var(--len), 3) * var(--hour)));
  }

  .calendar li .what {
    display: contents;
  }

  .calendar li:not(.run) h3 {
    grid-area: 2 / 1 / 3 / -1;
  }

  .calendar li:not(.run) .meta {
    grid-area: 1 / 3;
  }

  .calendar li.audio .meta,
  .calendar li.chat .meta,
  .calendar li.article .meta {
    margin: 0;
  }

  .calendar h3,
  .calendar li.commit .text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  .calendar ol.entries > li.run {
    grid-row: 1 / -1;
    grid-auto-columns: var(--hour);
    width: auto;
    padding: 0;
  }

  .calendar li.run ul.commits,
  .calendar li.run details.more,
  .calendar li.run details.more[open]::details-content {
    display: contents;
  }

  .calendar li.run details.more:not([open])::details-content {
    display: none;
  }

  .calendar li.run .head,
  .calendar li.run li.commit,
  .calendar li.run summary {
    overflow: clip;
    height: var(--unit);
    padding: 0.1rem 0.1rem 0;
  }

  .calendar li.run h3 {
    margin: 0;
  }

  .calendar li.run li.commit {
    align-content: flex-start;
  }
}

