:root {
  color-scheme: light;
  --ink: #202d27;
  --muted: #526159;
  --pine: #27573d;
  --line: #cdd2c6;
  --paper: #fafaf5;
  font: 100%/1.65 "DM Sans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
.wrap { width: min(72rem, calc(100% - 3rem)); margin-inline: auto; }
a { color: inherit; text-underline-offset: .24em; }
a:hover { color: var(--pine); }
.mast { border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; min-height: 4.25rem; }
.bar a { text-decoration: none; padding-block: .55rem; }
.bar a:last-child { font-size: .94rem; }
.wordmark { font-weight: 750; letter-spacing: -.045em; font-size: 1.4rem; }
.wordmark span { font-weight: 450; color: var(--pine); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.24; }
.cover { display: grid; grid-template-columns: 1fr 1.06fr; align-items: center; gap: 2.8rem; padding-block: clamp(2rem, 5vw, 4.5rem); }
.cover-text { padding-block: 1rem; }
.cover h1, .book h1 { font-family: "Baskervville", Georgia, "Songti SC", SimSun, serif; font-weight: 500; font-size: clamp(3.2rem, 6.25vw, 5.7rem); letter-spacing: -.05em; }
.cover h1 span { display: block; }
.cover p, .book-head p { color: var(--muted); margin-top: 1.4rem; max-width: 25em; font-size: 1.1rem; }
.cover img { width: 100%; height: auto; aspect-ratio: 1.46; object-fit: cover; border-radius: .25rem; }
.catalog { border-top: 2px solid var(--ink); padding: 1.25rem 0 3rem; }
.catalog h2, .summary h2 { font-size: 1.12rem; }
.projects { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.project { border-bottom: 1px solid var(--line); border-left: .34rem solid var(--pine); background: #eef1e8; padding: clamp(1.3rem, 3vw, 2.7rem); display: flex; gap: 2rem; align-items: center; justify-content: space-between; }
.project h3 { font: 650 2.25rem/1.25 "Songti SC", SimSun, serif; }
.project h3 a { text-decoration: none; }
.project p { color: var(--muted); margin-top: .7rem; max-width: 34em; }
.foot { color: var(--muted); font-size: .88rem; padding-bottom: 2rem; }
button, input, select, textarea { font: inherit; color: inherit; }
button, select { cursor: pointer; }
.button, .secondary { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; min-height: 2.8rem; padding: .55rem 1.2rem; border-radius: .3rem; border: 1px solid var(--pine); font-weight: 600; text-decoration: none; }
.button { background: var(--pine); color: white; }
.button:hover { color: white; background: #1d432e; }
.secondary { color: var(--pine); background: transparent; }
.secondary:hover { background: #e8eee3; }
.button:disabled, select:disabled { opacity: .6; cursor: default; }
:focus-visible { outline: 3px solid #ac661e; outline-offset: 3px; }
.book { padding-block: 3rem; }
.book-head, .toolbar, .actions { display: flex; align-items: center; gap: 1rem; }
.book-head { justify-content: space-between; align-items: flex-end; padding-bottom: 2rem; }
.book h1 { font-size: clamp(2.8rem, 4.6vw, 4.5rem); }
.book-head p { max-width: none; margin-top: .75rem; }
.toolbar { border-block: 1px solid var(--line); padding-block: .85rem; flex-wrap: wrap; }
.toolbar select { width: min(16rem, 60%); }
.toolbar span { margin-left: auto; color: var(--muted); }
input, textarea, select { max-width: 100%; padding: .55rem .7rem; border: 1px solid #849386; border-radius: .25rem; background-color: #fff; }
select { appearance: none; padding-right: 2.5rem; background-image: linear-gradient(45deg, transparent 50%, var(--pine) 50%),linear-gradient(135deg,var(--pine) 50%, transparent 50%); background-position: calc(100% - 1.05rem) center,calc(100% - .75rem) center; background-size: .3rem .3rem; background-repeat: no-repeat; }
textarea { width: 100%; resize: vertical; }
.empty { padding: 2.8rem 1rem; text-align: center; background: #eff2eb; margin-block: 1rem; }
.empty p { color: var(--muted); margin-top: .35rem; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; margin-block: 1rem; }
th, td { text-align: left; padding: .85rem .55rem; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
th { color: var(--muted); font-size: .9rem; }
th:nth-child(1) { width: 19%; } th:nth-child(2) { width: 30%; } th:last-child { width: 7.4rem; }
td small { display: block; color: var(--muted); font-size: .9rem; }
td { white-space: pre-wrap; }
.text-button { border: 0; background: none; color: var(--pine); text-decoration: underline; text-underline-offset: .25em; padding: .4rem; }
.summary { max-width: 48rem; margin-top: 2rem; }
.summary textarea { margin-block: .65rem; }
.storage-note, #feedback, #editor-error { color: var(--muted); font-size: .94rem; }
.storage-note { margin-block: 2rem; }
#feedback:not(:empty), #editor-error:not(:empty) { margin-block: .8rem; }
dialog { color: var(--ink); border: 1px solid var(--line); border-radius: .5rem; background: var(--paper); padding: 1.6rem; width: min(30rem, calc(100% - 2rem)); max-height: 88dvh; }
dialog::backdrop { background: #182b2177; }
dialog label { display: block; margin-block: .8rem .25rem; font-weight: 600; }
dialog small { color: var(--muted); font-weight: 400; }
dialog input { width: 100%; }
.actions { justify-content: flex-end; margin-top: 1rem; }
@media(max-width: 700px) {
  .wrap { width: calc(100% - 2rem); }
  .cover { grid-template-columns: 1fr; gap: 1.25rem; }
  .cover-text { padding: 0; }
  .cover img { aspect-ratio: 2.28; }
  .project, .book-head { align-items: flex-start; flex-direction: column; gap: 1.3rem; }
  .book { padding-top: 2rem; }
  table, tbody, tr, td { display: block; }
  thead { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
  tr { padding-block: 1rem; border-bottom: 1px solid var(--line); }
  td { padding: .15rem 0; border: 0; }
  td:first-child { color: var(--muted); font-size: .9rem; }
  td:last-child { margin-top: .4rem; }
}
