:root {
  color-scheme: light;
  --paper: #f7f4ed;
  --sheet: #fffcf6;
  --ink: #292820;
  --muted: #625e52;
  --line: #d4cdbf;
  --green: #365b49;
  --rust: #994b32;
  --serif: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', SimSun, serif;
  --sans: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --mono: 'IBM Plex Mono', Consolas, monospace;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.7 var(--sans);
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: var(--rust);
}
a:focus-visible,
summary:focus-visible,
button:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
code,
time {
  font-family: var(--mono);
}
[hidden] {
  display: none !important;
}
[id] {
  scroll-margin-top: 24px;
}
.wrap {
  width: min(1120px, calc(100% - 80px));
  margin-inline: auto;
}
.skip {
  position: absolute;
  top: -100px;
  left: 12px;
  padding: 8px 16px;
  background: var(--sheet);
  z-index: 2;
}
.skip:focus {
  top: 8px;
}
.site-bar {
  border-bottom: 1px solid var(--line);
}
.bar-inner,
.bar-inner nav,
.brand {
  display: flex;
  align-items: center;
}
.bar-inner {
  justify-content: space-between;
  gap: 20px;
  min-height: 67px;
}
.brand {
  gap: 9px;
  font: 700 20px/1.4 var(--serif);
}
.brand img {
  display: block;
}
.bar-inner nav {
  align-self: stretch;
  gap: 26px;
  font-size: 14px;
}
.bar-inner nav a {
  display: grid;
  align-items: center;
  border-bottom: 2px solid transparent;
}
.bar-inner [aria-current='page'] {
  color: var(--rust);
  border-color: currentColor;
  font-weight: 700;
}

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: center;
  padding-block: 56px 40px;
  border-bottom: 3px double var(--ink);
}
h1 {
  font: 800 clamp(52px, 6vw, 80px)/1.12 var(--serif);
  letter-spacing: 0.04em;
}
.intro p {
  max-width: 33em;
  margin: 16px 0 10px;
  color: var(--muted);
}
.history-link,
.recall-actions a {
  color: var(--green);
  font-size: 14px;
  font-weight: 600;
}
.history-link span {
  margin-left: 4px;
}
.file-index {
  display: flex;
  gap: 12px;
  padding-top: 12px;
}
.folder {
  --fill: #e0e8db;
  --edge: #a9b9a6;
  position: relative;
  display: grid;
  align-content: space-between;
  width: 138px;
  min-height: 118px;
  padding: 14px 18px 13px;
  color: var(--green);
  background: var(--fill);
  border: 1px solid var(--edge);
  border-radius: 0 7px 7px 7px;
}
.folder::before {
  content: '';
  position: absolute;
  left: -1px;
  top: -10px;
  width: 48%;
  height: 9px;
  background: var(--fill);
  border: 1px solid var(--edge);
  border-bottom: 0;
  border-radius: 6px 12px 0 0;
}
.folder:hover {
  color: var(--ink);
  box-shadow: 0 4px 0 #2a27180c;
}
.folder > span {
  font: 600 14px/1.5 var(--sans);
}
.folder strong {
  font: 500 52px/1 var(--serif);
  font-variant-numeric: lining-nums tabular-nums;
}
.folder small {
  font: 13px var(--sans);
}
.git-folder {
  --fill: #ede0cc;
  --edge: #cbb499;
  color: #754d32;
}

.archive-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 31%);
  gap: clamp(32px, 5vw, 72px);
  padding-block: 38px 52px;
}
.section-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ink);
}
h2 {
  font: 700 26px/1.45 var(--serif);
}
.section-head p,
.empty {
  font-size: 14px;
  color: var(--muted);
}
.empty {
  padding-block: 18px;
}
#git {
  margin-top: 36px;
}
.project {
  padding: 20px 0 19px;
  border-bottom: 1px solid var(--line);
}
.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  font-size: 12px;
}
.project-meta span {
  color: var(--green);
  font-weight: 700;
}
#git .project-meta span {
  color: var(--rust);
}
.project-meta code {
  border-left: 1px solid var(--line);
  padding-left: 9px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.project h3 {
  margin: 4px 0;
  font: 700 23px/1.5 var(--serif);
}
.project > p,
.timeline p,
.restore p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.85;
}
summary {
  cursor: pointer;
  list-style: none;
  color: var(--green);
  font-size: 14px;
  font-weight: 600;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 3px 3px 10px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
details[open] > summary::after {
  margin-bottom: 0;
  transform: rotate(225deg);
}
.recall {
  margin-top: 5px;
}
.recall summary {
  width: fit-content;
  padding: 5px 0;
}
.recall dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: baseline;
  gap: 8px 18px;
  margin: 8px 0 0;
  padding: 16px 18px;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-bottom: 0;
}
.recall dt {
  color: var(--muted);
  font-size: 13px;
}
.recall dd {
  min-width: 0;
  margin: 0;
}
.recall dd code {
  display: block;
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.recall-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 0 18px 15px;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-top: 0;
}
.recall-actions:empty {
  display: none;
}
.recall-actions button {
  font: 600 13px/1.65 var(--sans);
  padding: 6px 12px;
  cursor: pointer;
  color: var(--green);
  background: #edf1e8;
  border: 1px solid #afc0ad;
  border-radius: 4px;
}
.recall-actions button:hover {
  background: #e1eadc;
}
.copy-status {
  color: var(--green);
  font-size: 13px;
}

#changes {
  align-self: start;
  padding: 22px;
  background: #eeeade;
  border: 1px solid var(--line);
  border-top: 3px solid var(--rust);
}
#changes h2 {
  font-size: 23px;
}
.timeline {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}
.timeline li {
  position: relative;
  padding: 0 0 23px 17px;
  margin-left: 5px;
  border-left: 1px solid #c6bba9;
}
.timeline li:last-child {
  border-left-color: transparent;
  padding-bottom: 5px;
}
.timeline li::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 7px;
  width: 7px;
  height: 7px;
  background: #eeeade;
  border: 1px solid #937861;
  border-radius: 50%;
}
.timeline li:first-child::before {
  background: var(--rust);
  border-color: var(--rust);
}
.timeline time {
  color: var(--rust);
  font-size: 12px;
}
.timeline h3 {
  margin: 3px 0;
  font: 700 17px/1.5 var(--serif);
}
.timeline p {
  font-size: 13px;
}
.restore {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #cfc6b7;
}
.restore p {
  margin-top: 10px;
}
.restore code {
  font-size: 13px;
  overflow-wrap: anywhere;
}
footer {
  display: flex;
  justify-content: space-between;
  padding: 18px 0 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 820px) {
  .wrap {
    width: calc(100% - 40px);
  }
  .masthead {
    gap: 20px;
    padding-block: 38px 28px;
  }
  .folder {
    width: 105px;
    padding-inline: 13px;
  }
  .archive-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
    padding-top: 28px;
  }
}
@media (max-width: 580px) {
  .bar-inner {
    min-height: 54px;
    flex-wrap: wrap;
    gap: 0 12px;
  }
  .brand {
    font-size: 17px;
    gap: 5px;
  }
  .brand img {
    width: 22px;
    height: 22px;
  }
  .bar-inner nav {
    gap: 13px;
    font-size: 13px;
    min-height: 44px;
  }
  .masthead {
    grid-template-columns: minmax(0, 1fr);
  }
  .intro p {
    font-size: 15px;
  }
  .folder {
    width: auto;
    flex: 1;
    min-height: 64px;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 4px;
  }
  .folder strong {
    font-size: 34px;
  }
  .file-index {
    gap: 10px;
  }
  .recall dl {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .recall dd + dt {
    margin-top: 7px;
  }
}
