* {
  box-sizing: border-box;
}
:root {
  color-scheme: light;
  --paper: #f6f4ed;
  --ink: #232b28;
  --muted: #626b63;
  --line: #d8d6c9;
  --green: #254e41;
  --soft: #e6eee6;
  --amber: #715221;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    15px/1.6 "Inter",
    "Microsoft YaHei",
    system-ui,
    sans-serif;
}
header {
  min-height: 76px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 0 clamp(18px, 5vw, 84px);
  background: #fffdf7;
}
header nav {
  display: flex;
  gap: 10px;
}
.brand {
  white-space: nowrap;
  letter-spacing: 0.1em;
  font-size: 16px;
  font-weight: 650;
}
.brand b {
  font:
    600 25px Georgia,
    serif;
  letter-spacing: -0.06em;
}
.brand span {
  color: #a0a39a;
  margin: 0 5px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  border: 1px solid var(--green);
  background: var(--green);
  color: white;
  border-radius: 4px;
  padding: 7px 15px;
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
button.quiet,
button.link,
nav button {
  background: transparent;
  color: var(--green);
  border-color: var(--line);
}
nav button {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 10px 12px;
}
nav button.active {
  border-bottom-color: var(--green);
  font-weight: 650;
}
button.link {
  border: 0;
  padding: 4px 7px;
}
#signout {
  margin-left: auto;
}
main {
  max-width: 1500px;
  margin: auto;
  padding: 34px clamp(18px, 5vw, 84px) 70px;
}
h1 {
  font:
    500 clamp(31px, 4vw, 54px) / 1.17 "STIX Two Text",
    "Songti SC",
    SimSun,
    serif;
  letter-spacing: -0.035em;
  margin: 5px 0 15px;
}
h2 {
  font-size: 19px;
  font-weight: 600;
  margin: 8px 0 15px;
}
.eyebrow,
.mono,
.stat strong {
  font-family: "IBM Plex Mono", Consolas, monospace;
}
.eyebrow {
  color: var(--green);
  font-size: 12px;
  letter-spacing: 0.06em;
  margin: 0;
}
.lead,
.toolbar,
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.toolbar {
  margin: 24px 0 12px;
}
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(100px, 1fr));
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  margin: 16px 0 26px;
}
.stat {
  padding: 11px 18px 12px 0;
  display: grid;
  gap: 0;
}
.stat span,
.muted,
.small {
  color: var(--muted);
}
.stat strong {
  font-size: 27px;
  line-height: 1.22;
  font-weight: 500;
}
.small {
  font-size: 13px;
}
.tablewrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
th,
td {
  padding: 10px 9px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
th {
  color: var(--muted);
  font-weight: 500;
  background: #eeede4;
}
tbody tr:hover {
  background: #f0f1e9;
}
.gap-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.gap-toggle input {
  accent-color: var(--green);
  width: 1.1em;
  height: 1.1em;
}
.catalog-gap {
  color: #626960;
  background: #eeeee8;
}
.catalog-gap .badge {
  color: #626960;
  background: transparent;
  border-style: dashed;
  border-color: #999d94;
}
td.issueno {
  min-width: 90px;
  font-family: Georgia, serif;
  font-size: 21px;
}
td:first-child,
th:first-child {
  padding-left: 12px;
}
.badge {
  display: inline-block;
  border: 1px solid #c7d4c9;
  padding: 1px 8px;
  color: var(--green);
  background: var(--soft);
  border-radius: 18px;
  font-size: 12px;
}
.badge.warn {
  background: #f6eed9;
  color: var(--amber);
  border-color: #decfa7;
}
.panel,
dialog,
.editor {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px;
}
dialog {
  width: min(92vw, 550px);
  color: var(--ink);
  box-shadow: 0 16px 80px #18211933;
}
dialog::backdrop {
  background: #15231c55;
}
dialog [role="alert"] pre {
  max-height: 40vh;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
form,
label {
  display: grid;
  gap: 7px;
}
form {
  gap: 13px;
}
input,
select,
textarea {
  color: var(--ink);
  background: #fffdf8;
  border: 1px solid #b9bbae;
  border-radius: 4px;
  padding: 7px 9px;
  max-width: 100%;
}
textarea {
  width: 100%;
  resize: vertical;
  min-height: 110px;
}
.empty {
  padding: 30px 12px;
  color: var(--muted);
}
.case {background:#fffdf8;border:1px solid var(--line);margin:8px 0;border-radius:5px;}
.case summary {cursor:pointer;padding:13px;display:flex;gap:12px;align-items:center;}
.case summary span,.case small {color:var(--muted);font-size:13px;}
.case summary small {margin-left:auto;}
.case summary span,.case summary small {flex-shrink:0;white-space:nowrap;}
.case summary strong {min-width:0;overflow-wrap:anywhere;}
.casebody {padding:0 16px 16px;}
.proof-images {display:flex;flex-wrap:wrap;gap:12px;}
.proof-images figure {width:min(100%,340px);margin:0;}
.proof-images figure div {position:relative;}
.proof-images img {display:block;width:100%;}
.proof-images i {position:absolute;border:2px solid #a64f25;background:#f7993522;pointer-events:none;}
.photo-outline {position:absolute;border:2px solid var(--green);text-decoration:none;}
.photo-outline span {position:absolute;top:0;left:0;white-space:nowrap;background:var(--green);color:white;padding:0 4px;font-size:12px;}
.proof-choices label {max-width:34rem;margin-top:5px;}
.proof-choices select {width:100%;}
.preview blockquote {margin:5px 0 16px;padding-left:12px;border-left:2px solid var(--line);}
.proof-choices {max-height:300px;overflow:auto;padding-left:22px;}
.proof-choices li {margin:7px 0;}
.proof-choices small {display:block;}
.preview {margin-top:22px;max-width:860px;}
#login {
  max-width: 410px;
  margin: 12vh auto;
}
#message.on {
  position: fixed;
  z-index: 5;
  bottom: 17px;
  left: 50%;
  transform: translateX(-50%);
  background: #20392e;
  color: #fff;
  padding: 10px 22px;
  border-radius: 5px;
  max-width: 92vw;
  box-shadow: 0 3px 20px #0002;
}
.spread {
  display: grid;
  grid-template-columns: minmax(320px, 1.15fr) minmax(280px, 0.85fr);
  gap: 18px;
  align-items: start;
}
.pageimage {
  position: relative;
  width: 100%;
  background: #e6e3d8;
  min-height: 150px;
}
.pageimage img {
  display: block;
  width: 100%;
}
.overlay {
  position: absolute;
  border: 3px solid #bc5e24;
  background: #f4913220;
  pointer-events: none;
}
.blocks {
  max-height: 49vh;
  overflow: auto;
  margin: 12px 0;
}
.block {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  color: var(--ink);
  background: #fffdf8;
  border-radius: 0;
  padding: 10px;
}
.block.selected {
  background: var(--soft);
  box-shadow: inset 3px 0 var(--green);
}
.block small {
  display: block;
  color: var(--green);
}
.editor {
  margin: 12px 0;
}
.issuehead {
  font:
    500 20px Georgia,
    "Songti SC",
    serif;
}
.warning {
  border-left: 3px solid #b89043;
  padding: 8px 12px;
  background: #f5edda;
}
.filepick {
  width: 100%;
}
[hidden] {
  display: none !important;
}
a {
  color: var(--green);
}
@media (max-width: 760px) {
  header {
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 16px;
  }
  .brand {
    margin-right: auto;
  }
  header nav {
    order: 3;
    width: 100%;
  }
  main {
    padding-top: 20px;
  }
  .spread {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .lead {
    align-items: start;
  }
  .blocks {
    max-height: 35vh;
  }
}
