:root {
  color-scheme: light;
  --paper: #f8f9f4;
  --white: #fff;
  --ink: #182420;
  --muted: #53645a;
  --rule: #dce4d9;
  --green: #235b46;
  --soft: #e8f1e8;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-family: system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--green);
  text-underline-offset: 3px;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.6;
}
.shell {
  width: min(100% - 2.5rem, 65rem);
  margin-inline: auto;
}
.top {
  border-bottom: 1px solid var(--rule);
}
.masthead {
  min-height: 68px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.wordmark {
  font-size: 1.25rem;
  font-weight: 750;
  letter-spacing: -0.04em;
  text-decoration: none;
  color: var(--ink);
}
.wordmark span {
  font-weight: 500;
  color: var(--green);
}
.api {
  font: 600 0.82rem var(--mono);
  text-decoration: none;
}
.api span {
  font-size: 1rem;
}
main {
  padding-block: clamp(2.5rem, 7vw, 5.25rem);
}
h1 {
  font-size: clamp(2.15rem, 5vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.065em;
  margin: 0;
}
.intro {
  margin: 0.9rem 0 2rem;
  color: var(--muted);
  line-height: 1.55;
}
.catalog {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 13px;
  box-shadow: 0 12px 30px #243f2810;
  overflow: hidden;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem;
  background: #f1f5ee;
  border-bottom: 1px solid var(--rule);
}
label[for="search"] {
  position: absolute;
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  overflow: hidden;
}
.toolbar input {
  width: 100%;
  min-width: 0;
  min-height: 43px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: white;
  padding: 0.6rem 0.75rem;
  color: var(--ink);
}
button {
  border: 1px solid var(--rule);
  background: white;
  color: var(--green);
  border-radius: 6px;
  padding: 0.56rem 0.75rem;
  white-space: nowrap;
  font-weight: 650;
  font-size: 0.83rem;
}
button:hover,
a.api:hover {
  background: var(--soft);
}
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}
#status {
  margin: 0;
  padding: 0.65rem 1rem;
  color: var(--muted);
  font-size: 0.8rem;
  border-bottom: 1px solid var(--rule);
}
#tree {
  padding: 0 0.65rem 0.65rem;
}
#tree:empty {
  display: none;
}
.entries {
  list-style: none;
  margin: 0;
  padding: 0;
}
.entries .entries {
  margin-left: 0.85rem;
  padding-left: 0.55rem;
  border-left: 1px solid var(--rule);
}
.entry {
  border-bottom: 1px solid var(--rule);
}
.entries > li:last-child {
  border-bottom: none;
}
summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  align-items: center;
  grid-template-columns: 1rem minmax(0, 1fr) auto;
  gap: 0.6rem;
  padding: 0.72rem 0.55rem;
}
summary::-webkit-details-marker {
  display: none;
}
summary:hover {
  background: var(--paper);
}
.marker {
  color: var(--green);
  text-align: center;
}
[open] > .folder-summary .marker {
  transform: rotate(90deg);
}
.filename {
  font: 0.83rem var(--mono);
  overflow-wrap: anywhere;
}
.folder-summary .filename {
  color: var(--green);
  font-weight: 750;
}
.meta {
  font-size: 0.76rem;
  color: var(--muted);
  white-space: nowrap;
}
.detail {
  margin: 0.1rem 0.55rem 0.7rem;
  padding: 0.8rem 0.85rem;
  background: var(--paper);
  border-radius: 6px;
}
.detail dl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.5rem 0.75rem;
  margin: 0 0 0.8rem;
  font-size: 0.82rem;
}
.detail dt {
  color: var(--muted);
}
.detail dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.detail code {
  font-family: var(--mono);
  font-size: 0.75rem;
}
.detail footer {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.notice {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  padding: 0.8rem 1rem;
  background: var(--ink);
  color: white;
  border-radius: 8px;
}
@media (max-width: 550px) {
  .shell {
    width: calc(100% - 1.4rem);
  }
  .toolbar {
    padding: 0.65rem;
    gap: 0.45rem;
  }
  .toolbar button {
    font-size: 0.75rem;
    padding-inline: 0.55rem;
  }
  #tree {
    padding-inline: 0.3rem;
  }
  summary {
    padding-inline: 0.32rem;
    gap: 0.35rem;
  }
  .entries .entries {
    margin-left: 0.42rem;
    padding-left: 0.35rem;
  }
  .meta {
    font-size: 0.69rem;
  }
}
