:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: #20251f;
  background: #fafbf9;
  font-size: 16px;
  --muted: #747c72;
  --line: #e4e8e1;
  --green: #356443;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  color: inherit;
}
button:hover {
  background: #eef2eb;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #75a184;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
header {
  height: 72px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: #fff;
}
.brand {
  font-weight: 800;
  letter-spacing: -0.8px;
  text-decoration: none;
  color: inherit;
  font-size: 20px;
}
.brand span {
  font-weight: 500;
  letter-spacing: -0.4px;
  border-left: 1px solid #cfd6cc;
  margin-left: 16px;
  padding-left: 16px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-actions span {
  color: var(--muted);
  font-size: 14px;
}
#workspace {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  height: calc(100dvh - 72px);
}
aside {
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 24px 16px 0;
  background: #f5f7f3;
  min-height: 0;
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #dde3d9;
  border-radius: 10px;
  padding: 10px 12px;
}
.search span {
  font-size: 24px;
  line-height: 20px;
  color: var(--muted);
}
input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  min-width: 0;
}
nav {
  display: flex;
  gap: 4px;
  padding: 18px 0 14px;
}
nav button {
  border: 0;
  padding: 8px 7px;
  white-space: nowrap;
  font-size: 14px;
  color: var(--muted);
}
nav button.selected {
  background: #e5ecdf;
  color: #2f4930;
}
nav span {
  font-size: 12px;
  margin-left: 4px;
}
.list-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 16px;
  gap: 8px;
}
.list-tools select {
  background: transparent;
  border: 0;
  color: #4b5548;
  max-width: 170px;
}
.list-tools span {
  font-size: 13px;
  color: var(--muted);
}
#list {
  overflow: auto;
  min-height: 0;
  padding-bottom: 24px;
}
.entry {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 14px;
  margin: 0 0 5px;
  background: transparent;
}
.entry.active {
  background: white;
  border-color: #d9e1d3;
  box-shadow: 0 2px 5px #273d2510;
}
.entry strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}
.entry p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 9px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.entry small {
  font-size: 12px;
  color: var(--muted);
}
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #bac2b7;
  margin-right: 6px;
}
.dot.reviewed {
  background: #60956c;
}
.dot.needs_changes,
.dot.changed {
  background: #c29344;
}
#reader {
  overflow: auto;
  background: white;
  padding: 42px clamp(24px, 5vw, 88px) 80px;
}
#document {
  max-width: 900px;
  margin: auto;
}
#back {
  display: none;
}
.meta {
  display: flex;
  gap: 18px;
  font-size: 13px;
  color: var(--muted);
}
h1 {
  font-size: 32px;
  line-height: 1.35;
  letter-spacing: -0.8px;
  margin: 14px 0 22px;
}
h2 {
  font-size: 21px;
  line-height: 1.5;
  margin: 28px 0 12px;
}
.document-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.document-tools button {
  border: 0;
  color: var(--muted);
  font-size: 14px;
}
.badge {
  background: #f1f3ee;
  color: #69745e;
  border-radius: 5px;
  padding: 5px 9px;
  font-size: 13px;
}
.badge.reviewed {
  color: #3a6c45;
  background: #edf5ed;
}
.badge.needs_changes,
.badge.changed {
  background: #fbf3e6;
  color: #976b24;
}
article {
  line-height: 1.85;
  overflow-wrap: anywhere;
  padding: 14px 0 24px;
}
article h1 {
  font-size: 27px;
}
article p {
  margin: 16px 0;
}
article ul,
article ol {
  padding-left: 25px;
}
article li {
  margin: 5px 0;
}
article code {
  background: #f2f4f0;
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 14px;
}
article pre {
  white-space: pre-wrap;
  background: #f5f7f2;
  border-radius: 8px;
  padding: 18px;
  line-height: 1.7;
  font-size: 14px;
}
article .table-wrap {
  overflow: auto;
  margin: 20px 0;
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 420px;
  font-size: 15px;
}
th,
td {
  padding: 12px 14px;
  border: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}
th {
  font-weight: 600;
  background: #f7f9f5;
}
article a,
.ref {
  color: #356443;
}
.ref {
  border: 0;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: inherit;
  overflow-wrap: anywhere;
  text-align: left;
}
.review {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.review-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.review-heading h2 {
  margin: 0;
  font-size: 18px;
}
.review-heading span {
  font-size: 13px;
  color: var(--muted);
}
textarea {
  resize: vertical;
  width: 100%;
  margin: 16px 0 12px;
  padding: 14px;
  background: #fafbf9;
  border: 1px solid #d9e0d5;
  border-radius: 8px;
  line-height: 1.6;
  min-height: 110px;
  font-size: 16px;
}
.review-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  background: var(--green);
  border: 1px solid var(--green);
  color: white;
  border-radius: 8px;
  padding: 10px 16px;
  text-decoration: none;
}
.primary:hover {
  background: #294e35;
  color: white;
}
.hint {
  font-size: 13px;
  color: var(--muted);
  margin: 14px 0;
}
.empty {
  text-align: center;
  padding: 15vh 10px;
  color: var(--muted);
}
.empty h2 {
  font-size: 21px;
  font-weight: 500;
  color: #505b4c;
}
.empty p {
  font-size: 15px;
}
.empty-mark {
  font-size: 42px;
  color: #a4b19c;
}
#login {
  min-height: calc(100dvh - 72px);
  display: grid;
  place-items: center;
  padding: 30px;
}
.login-card {
  max-width: 460px;
}
.login-card h1 {
  font-size: 38px;
}
.login-card p {
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 28px;
}
.eyebrow {
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--muted);
}
#notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #253825;
  color: white;
  max-width: 90vw;
  padding: 12px 20px;
  border-radius: 9px;
  box-shadow: 0 4px 20px #0002;
  z-index: 10;
}
#stale {
  color: #976b24;
  font-size: 14px;
}
#reset {
  border: 0;
  color: var(--muted);
  margin-left: auto;
}
@media (max-width: 760px) {
  header {
    padding: 0 18px;
    height: 62px;
  }
  .brand {
    font-size: 18px;
  }
  .brand span {
    margin-left: 10px;
    padding-left: 10px;
  }
  .header-actions {
    gap: 6px;
  }
  .header-actions span {
    display: none;
  }
  .header-actions button {
    font-size: 14px;
    padding: 6px 8px;
  }
  #workspace {
    height: calc(100dvh - 62px);
    display: block;
  }
  aside {
    height: 100%;
    border-right: 0;
    padding: 18px 14px 0;
  }
  nav button {
    font-size: 15px;
    padding: 8px 12px;
  }
  #reader {
    display: none;
    height: 100%;
    padding: 20px 20px 50px;
  }
  body.reading aside {
    display: none;
  }
  body.reading #reader {
    display: block;
  }
  #back {
    display: inline-block;
    margin: 0 0 26px;
    border: 0;
    padding: 0;
    color: var(--green);
  }
  h1 {
    font-size: 28px;
  }
  .meta {
    font-size: 12px;
    flex-wrap: wrap;
    gap: 6px;
  }
  .review-actions button {
    font-size: 16px;
  }
  .login-card h1 {
    font-size: 30px;
  }
  #login {
    min-height: calc(100dvh - 62px);
  }
  article {
    font-size: 16px;
  }
  #search,
  #status,
  textarea {
    font-size: 16px;
  }
  .review-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}
