:root {
  font:
    16px Inter,
    -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: #172c28;
  background: #f7f8f3;
  --ink: #172c28;
  --green: #12604c;
  --line: #d9dfd5;
  --soft: #60716b;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  background: #173d34;
  color: #f4f5ee;
}
header > div,
main {
  max-width: 1184px;
  margin: auto;
  padding-left: 42px;
  padding-right: 42px;
}
.mast {
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand {
  color: inherit;
  display: flex;
  align-items: center;
  gap: 13px;
  font-weight: 670;
  letter-spacing: 0.04em;
  font-size: 20px;
  text-decoration: none;
}
.brand i {
  width: 23px;
  height: 23px;
  display: inline-block;
  border: 5px solid #dcf497;
  border-radius: 50%;
  position: relative;
}
.brand i:after {
  content: "";
  position: absolute;
  background: #173d34;
  width: 8px;
  height: 10px;
  right: -6px;
  top: -5px;
  transform: rotate(-27deg);
}
.state {
  margin-left: auto;
  color: #e7eee4;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.state:before {
  content: "";
  width: 7px;
  height: 7px;
  background: #c2e79c;
  border-radius: 50%;
}
.state.warn:before {
  background: #e6ac67;
}
.intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 45px 0 26px;
}
.date,
.totals b,
.pages small,
footer {
  font-variant-numeric: tabular-nums;
}
.date {
  margin: 0 0 8px;
  color: var(--soft);
  font-size: 13px;
}
.intro h1 {
  font-family: "Songti SC", "Noto Serif CJK SC", Georgia, serif;
  line-height: 1.17;
  letter-spacing: -0.045em;
  font-size: clamp(39px, 6vw, 62px);
  margin: 0;
}
.totals {
  display: flex;
  gap: 32px;
}
.totals div {
  display: grid;
  gap: 3px;
  min-width: 64px;
}
.totals b {
  font-size: 29px;
  line-height: 1.1;
  letter-spacing: -0.05em;
  font-weight: 600;
}
.totals span,
small {
  font-size: 12px;
  color: var(--soft);
}
nav {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--line);
}
button,
input {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
nav button {
  padding: 12px 2px;
  font-size: 15px;
  color: var(--soft);
  border-bottom: 3px solid transparent;
}
nav button[aria-current="page"] {
  color: var(--green);
  border-bottom-color: var(--green);
  font-weight: 650;
}
.tools {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 79px;
}
.search {
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: white;
  padding: 0 12px;
  color: var(--soft);
}
.search > span {
  font-size: 24px;
}
.search input {
  padding: 9px 0;
  width: min(44vw, 335px);
  border: none;
  background: transparent;
}
.search:focus-within {
  outline: 2px solid var(--green);
}
.search input:focus-visible {
  outline: none;
}
.primary {
  margin-left: auto;
  background: var(--green);
  color: #fff;
  border-radius: 7px;
  font-size: 14px;
  padding: 10px 15px;
}
a,
.link,
.subtle {
  color: var(--green);
  text-underline-offset: 3px;
}
.link,
.subtle {
  font-size: 13px;
}
.link {
  text-decoration: none;
}
.link:hover,
.subtle:hover {
  text-decoration: underline;
}
.notice:empty {
  display: none;
}
.notice {
  padding: 10px 0;
  color: #8a4c22;
  font-size: 14px;
}
.row {
  padding: 19px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 17px;
  border-top: 1px solid var(--line);
}
.name {
  font-weight: 640;
  font-size: 18px;
  overflow-wrap: anywhere;
  text-align: left;
  padding: 0;
}
.repo-id {
  display: block;
  margin-top: 2px;
  font-size: 0.78em;
  color: #586a63;
  font-weight: 440;
}
.repo-id[hidden] { display: none; }
.desc {
  margin: 7px 0 0;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  color: #475b54;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.meta,
.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.meta {
  margin-top: 9px;
  font-size: 12px;
  color: var(--soft);
}
.topic {
  color: #2d674f;
}
.actions {
  justify-content: flex-end;
  align-self: center;
  max-width: min(360px, 100%);
}
.downloads {
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 5px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.text-links {
  display: grid;
  gap: 5px;
  padding: 0 0 0 10px;
  margin: 8px 0;
  border-inline-start: 2px solid var(--line);
  list-style: none;
  overflow-wrap: anywhere;
}
.text-links a {
  text-decoration: underline;
}
.actions a,
.chip {
  border: 1px solid #cbd5ca;
  background: #fff;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  text-decoration: none;
  color: var(--green);
}
.actions a:hover,
.chip:hover {
  background: #ebf3e9;
}
.chip.on {
  background: #e8f1e6;
}
.empty {
  padding: 45px 15px;
  text-align: center;
  border: 1px dashed var(--line);
  color: var(--soft);
}
.pages {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 18px;
}
.pages button {
  font-size: 13px;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 18px 0 30px;
  color: var(--soft);
  font-size: 12px;
}
dialog {
  max-height: 85vh;
  color: var(--ink);
  width: min(600px, calc(100vw - 30px));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 25px;
  background: #fbfcf8;
}
dialog::backdrop {
  background: #11241f70;
}
.dialoghead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  overflow-wrap: anywhere;
}
.dialoghead #close {
  font-size: 24px;
}
.box {
  margin: 16px 0;
}
.box p {
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.versions {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.versions strong {
  display: block;
  margin-bottom: 8px;
}
#modal form label {
  display: block;
  margin: 20px 0 8px;
}
#modal form input,
#day {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: inherit;
}
#modal form input {
  width: 100%;
  margin-bottom: 12px;
}
#search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
#search-wrap, #search {
  min-width: 0;
}
#search-submit, #add, nav button {
  white-space: nowrap;
}
[hidden] {
  display: none !important;
}
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid #338961;
  outline-offset: 3px;
}
@media (max-width: 650px) {
  nav { gap: 12px; flex-wrap: wrap; }
  #search-form { flex: 1; }
  header > div,
  main {
    padding-left: 18px;
    padding-right: 18px;
  }
  .intro {
    padding-top: 28px;
  }
  .totals {
    gap: 12px;
  }
  .totals div {
    min-width: 42px;
  }
  .totals b {
    font-size: 23px;
  }
  .row {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .actions {
    justify-content: flex-start;
  }
  .state {
    font-size: 12px;
  }
  .mast {
    min-height: 55px;
  }
  .tools {
    min-height: 70px;
  }
  .primary {
    padding: 9px 11px;
  }
  .name {
    font-size: 17px;
  }
  footer {
    flex-direction: column;
  }
}

.original {
  margin: 3px 0 7px;
  color: #526474;
  font-size: 0.84rem;
}
.original summary {
  cursor: pointer;
  width: fit-content;
}
.original p, .release-notes {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.original p {
  margin: 6px 0;
  padding-inline-start: 10px;
  border-inline-start: 2px solid #cfd8df;
}

a.name {
  color: var(--ink);
  text-decoration: none;
}
a.name:hover { text-decoration: underline; }
.code-trigger {
  padding: 6px 12px;
  border: 1px solid #176443;
  border-radius: 6px;
  background: #217346;
  color: white;
  font-size: 13px;
  font-weight: 600;
}
.code-trigger::after {
  content: "";
  display: inline-block;
  margin-left: 7px;
  vertical-align: middle;
  border: 4px solid transparent;
  border-bottom: 0;
  border-top-color: currentColor;
}
.code-trigger:hover { background: #195f39; }
.code-panel {
  position: fixed;
  inset: auto;
  margin: 0;
  padding: 14px;
  width: min(350px, calc(100vw - 16px));
  max-height: calc(100dvh - 16px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 6px 24px #173d3426;
  background: white;
  color: var(--ink);
  font-size: 14px;
}
.clone-options {
  display: flex;
  gap: 12px;
  margin: 8px 0 10px;
  border-bottom: 1px solid var(--line);
}
.clone-options button {
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.clone-options button[aria-pressed="true"] {
  font-weight: 650;
  border-bottom-color: var(--green);
}
.copy-line { display: flex; align-items: start; gap: 6px; }
.copy-line input, .copy-line textarea {
  flex: 1;
  min-width: 0;
  padding: 7px;
  background: #f7f9f6;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 5px;
  font: 12px/1.4 ui-monospace, monospace;
}
.copy-line textarea { resize: vertical; }
.copy-group small:not(:empty) { display: block; margin-top: 4px; }
.code-downloads {
  margin: 12px -14px 0;
  padding: 5px;
  display: grid;
  border-block: 1px solid var(--line);
}
.code-downloads a.link {
  padding: 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
}
.code-downloads a.link:hover { background: #eef3ed; }
.pinned-clone { margin-top: 10px; }
.pinned-clone summary { cursor: pointer; font-size: 13px; }
.pinned-clone > div { margin-top: 8px; }

.account-link { color: #e7eee4; text-underline-offset: 3px; font-size: 14px; }
.auth-main { max-width: 560px; margin: clamp(20px, 7vh, 68px) auto; padding: 0 16px; }
.auth-card {
  padding: clamp(22px, 5vw, 36px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow-wrap: anywhere;
}
.auth-card h1 { margin: 0 0 24px; font: 600 32px "Songti SC", Georgia, serif; }
.auth-card h2 { margin: 24px 0 12px; font-size: 18px; }
.auth-card form, .auth-card label { display: grid; gap: 8px; }
.auth-card form { gap: 14px; margin: 16px 0; }
.auth-card label { font-size: 14px; }
.auth-card input {
  min-width: 0; width: 100%; padding: 10px; color: inherit;
  border: 1px solid var(--line); border-radius: 6px; background: #fafbf8;
}
.auth-card input[readonly] { margin-bottom: 20px; }
.auth-action, .auth-provider {
  display: block; padding: 10px 14px; border-radius: 6px; text-align: center;
  background: var(--green); color: white; font-weight: 580; text-decoration: none;
}
.auth-provider { background: #24292f; }
.auth-note { color: var(--soft); font-size: 14px; }
.auth-settings { border-block: 1px solid var(--line); padding: 14px 0; margin: 22px 0; }
.auth-settings summary { cursor: pointer; }
.auth-settings code { font-size: 13px; }

.language-toggle {
  border: 1px solid currentColor;
  border-radius: 6px;
  padding: 5px 9px;
  background: transparent;
  color: inherit;
  font-size: 13px;
  white-space: nowrap;
}
.brand + .language-toggle, .dialoghead .language-toggle { margin-left: auto; }
@media (max-width: 650px) {
  .mast { flex-wrap: wrap; gap: 8px 12px; padding-block: 9px; }
  .brand { flex: 1; }
  .mast .state { order: 1; flex-basis: 100%; margin-left: 0; }
}
