:root {
  color-scheme: light;
  --paper: #f7f3e9;
  --ink: #1f332a;
  --soft: #586458;
  --line: #c9c9b9;
  --accent: #8b422c;
  --green: #274c3a;
  --serif:
    "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "STSong", "SimSun",
    serif;
  font-family:
    system-ui,
    -apple-system,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--green);
  text-underline-offset: 0.2em;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  background: var(--green);
  color: #fff;
  border: 1px solid var(--green);
  border-radius: 4px;
  padding: 0.7rem 1.3rem;
  font-weight: 630;
  min-height: 46px;
}
button:disabled {
  opacity: 0.55;
  cursor: default;
}
button:not(:disabled):hover {
  filter: brightness(0.92);
}
:focus-visible {
  outline: 3px solid #b27140;
  outline-offset: 3px;
}
button.minor,
.secondary {
  background: transparent;
  border: 1px solid #97a293;
  color: var(--green);
  padding: 0.65rem 1rem;
}
input:not([type="radio"]),
select {
  width: 100%;
  border: 1px solid #9aab9b;
  border-radius: 4px;
  min-height: 47px;
  background: #fffcf5;
  color: var(--ink);
  padding: 0.65rem 0.85rem;
}
label {
  display: block;
  font-weight: 600;
  margin: 0.4rem 0;
}
.mast,
main,
footer {
  width: min(1120px, calc(100% - 80px));
  margin: auto;
}
.mast {
  height: 83px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ink);
}
.brand,
.mastlink {
  text-decoration: none;
}
.brand {
  font: 700 1.28rem var(--serif);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  letter-spacing: 0.07em;
}
.mastlink {
  font-size: 0.91rem;
}
.book {
  position: relative;
  width: 28px;
  height: 24px;
  display: inline-block;
}
.book:before,
.book:after {
  content: "";
  position: absolute;
  top: 3px;
  height: 16px;
  width: 11px;
  border: 2px solid var(--green);
  border-radius: 1px 3px;
}
.book:before {
  left: 0;
  transform: skewY(12deg);
}
.book:after {
  right: 0;
  transform: skewY(-12deg);
}
.cover-layout {
  display: grid;
  grid-template-columns: 1.03fr 1fr;
  align-items: center;
  gap: clamp(28px, 6vw, 84px);
  padding: clamp(35px, 6vw, 82px) 0;
}
.kicker {
  font-size: 0.88rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  color: var(--accent);
  display: flex;
  gap: 10px;
  align-items: center;
}
.kicker span {
  display: inline-block;
  height: 2px;
  width: 28px;
  background: var(--accent);
}
h1,
h2,
h3 {
  font-family: var(--serif);
  line-height: 1.4;
  margin: 0;
}
h1 {
  font-size: clamp(2rem, 3.55vw, 3.4rem);
  line-height: 1.37;
  letter-spacing: -0.04em;
  margin: 16px 0;
}
.lead {
  color: var(--soft);
  line-height: 1.85;
  margin: 14px 0;
}
.meta {
  font-size: 0.94rem;
  font-weight: 600;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
#redeem {
  max-width: 420px;
  margin-top: 17px;
}
#redeem label {
  font-size: 0.94rem;
}
#redeem button {
  width: 100%;
  margin-top: 12px;
}
.art {
  margin: 0;
  padding: 9px;
  border: 1px solid #949987;
  box-shadow: inset 0 0 0 4px var(--paper);
}
.art img {
  width: 100%;
  height: auto;
  display: block;
}
.guide {
  padding: 24px 0;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 52px;
}
.guide h2 {
  font-size: 1.25rem;
  white-space: nowrap;
}
.guide p {
  margin: 0;
  max-width: 760px;
  color: var(--soft);
}
footer {
  padding: 18px 0 28px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--soft);
}
footer span {
  margin: 0 4px;
}
.error {
  color: #963b29;
  margin: 0.5rem 0;
  font-size: 0.94rem;
}
.error:empty {
  display: none;
}
.narrow {
  max-width: 720px;
  padding: 44px 0 65px;
  margin: auto;
}
.eyebrow {
  font-weight: 650;
  font-size: 0.92rem;
  color: var(--accent);
}
progress {
  accent-color: var(--green);
  height: 7px;
  width: 100%;
  display: block;
  margin: 10px 0 28px;
  border: 0;
  background: #dedecf;
  border-radius: 3px;
}
progress::-webkit-progress-bar {
  background: #dedecf;
  border-radius: 3px;
}
progress::-webkit-progress-value {
  background: var(--green);
  border-radius: 3px;
}
.question {
  font-size: clamp(1.42rem, 3.2vw, 2.1rem);
  letter-spacing: 0;
  margin: 10px 0 22px;
}
.choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  min-height: 61px;
  font-weight: 450;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fcfaf3;
  cursor: pointer;
  margin: 10px 0;
}
.choice:has(:checked) {
  border-color: var(--green);
  background: #e4ebdf;
}
.choice:has(:focus-visible) {
  outline: 3px solid #b27140;
}
.choice input {
  opacity: 0;
  position: absolute;
  width: 1px;
  height: 1px;
}
.letter {
  width: 30px;
  height: 30px;
  border: 1px solid #acb1a3;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  font-family: Georgia, serif;
}
.choice:has(:checked) .letter {
  color: white;
  background: var(--green);
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
.nav,
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.nav {
  justify-content: space-between;
  margin-top: 22px;
}
.save {
  font-size: 0.86rem;
  color: var(--soft);
  min-height: 1.5em;
}
.report section,
.panel {
  border-top: 1px solid var(--line);
  padding: 25px 0;
}
.report .hero {
  border: 0;
  padding-top: 0;
}
.report h1 {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
}
.score {
  font:
    500 2rem Georgia,
    serif;
  color: var(--accent);
}
.report h2 {
  font-size: 1.55rem;
  margin-bottom: 1rem;
}
.report h3 {
  margin: 0.9rem 0 0.4rem;
}
.report p {
  margin: 0.45rem 0 0.9rem;
}
.evidence {
  margin: 1rem 0;
  padding: 0 0 0 15px;
  border-left: 3px solid #8b9c80;
}
.small {
  color: var(--soft);
  font-size: 0.92rem;
}
.bars progress {
  margin: 6px 0 15px;
  height: 9px;
}
.spread {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.admin input,
.admin select {
  margin-bottom: 10px;
}
.admin summary {
  cursor: pointer;
  font-weight: 650;
}
.admin button {
  margin: 4px 0;
}
.admin table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.admin td,
.admin th {
  padding: 8px 4px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.admin .mono {
  font:
    0.92rem ui-monospace,
    monospace;
}
.admin h1 {
  font-size: 2.1rem;
}
.admin .panel h2 {
  margin-bottom: 10px;
}
dialog {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 5px;
  max-width: min(420px, 90vw);
  padding: 24px;
}
dialog::backdrop {
  background: #14211877;
}
@media (max-width: 760px) {
  .mast,
  main,
  footer {
    width: calc(100% - 38px);
  }
  .mast {
    height: 62px;
  }
  .brand {
    font-size: 1.1rem;
  }
  .cover-layout {
    grid-template-columns: 1fr;
    gap: 23px;
    padding: 26px 0;
  }
  .intro {
    display: contents;
  }
  .kicker {
    grid-row: 1;
  }
  .intro h1 {
    grid-row: 2;
    font-size: clamp(1.9rem, 7.65vw, 2.7rem);
    margin: -12px 0 0;
  }
  .art {
    grid-row: 3;
    padding: 5px;
  }
  .art img {
    height: clamp(112px, 37vw, 220px);
    object-fit: cover;
    object-position: 50% 56%;
  }
  .lead {
    grid-row: 4;
    margin: -7px 0 -10px;
    line-height: 1.6;
  }
  .lead br {
    display: none;
  }
  .meta {
    grid-row: 5;
    padding: 0 0 12px;
  }
  .intro #redeem {
    grid-row: 6;
    margin: -12px 0 0;
    max-width: none;
  }
  .guide {
    display: block;
    padding: 20px 0;
  }
  .guide h2 {
    margin-bottom: 6px;
  }
  .narrow {
    padding: 26px 0 40px;
  }
  .report section {
    padding: 20px 0;
  }
  .question {
    margin: 8px 0 18px;
  }
  .choice {
    min-height: 56px;
  }
  .admin .mono {
    font-size: 0.78rem;
  }
}
@media (max-height: 720px) and (max-width: 760px) {
  .art img {
    height: 100px;
  }
  .cover-layout {
    gap: 18px;
  }
}
