:root {
  color-scheme: dark;
  --black: #16130b;
  --black-low: #1f1b13;
  --gold: #d4af37;
  --gold-bright: #f2ca50;
  --ink: #221b12;
  --muted-ink: #786d5c;
  --paper: #f7f1e4;
  --line-dark: rgba(212, 175, 55, 0.26);
  --line-light: rgba(92, 69, 28, 0.18);
  --serif: "Noto Serif SC", "Songti SC", SimSun, serif;
  --sans: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--black);
}

body {
  min-height: 100%;
  margin: 0;
  font-family: var(--sans);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  min-height: 100vh;
}

.home-mode {
  background:
    radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.13), transparent 34rem),
    linear-gradient(180deg, #110e07 0%, var(--black) 42%, #0f0c07 100%);
  color: #eae1d4;
}

.home-page {
  position: relative;
  width: min(100%, 448px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 24px 116px;
}

.home-header {
  padding: 30px 0 32px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.home-header h1 {
  margin: 0;
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: clamp(26px, 7.5vw, 32px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: 0;
}

.lead {
  max-width: 25em;
  margin: 18px 0 0;
  color: rgba(234, 225, 212, 0.76);
  font-size: 15px;
  line-height: 1.85;
}

.prompt-panel {
  margin-top: 20px;
}

.prompt-panel h2 {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  color: #e1cb89;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
}

.prompt-panel img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background: #fffaf0;
}

.cover-panel {
  border: 1px solid var(--line-dark);
  background: rgba(35, 31, 23, 0.78);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
}

.grading-entry-panel {
  margin-top: 18px;
}

.grading-card {
  margin-top: 18px;
  border: 1px solid var(--line-dark);
  background: rgba(35, 31, 23, 0.78);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
}

.grading-link {
  margin: 8px 26px 30px;
  padding: 18px 0;
  border-top: 1px solid rgba(212, 175, 55, 0.18);
}

.grading-link .card-index {
  font-size: 18px;
  letter-spacing: 0;
}

.grading-reader .reader-header h1 {
  font-size: clamp(26px, 6vw, 42px);
}

.grading-reader .reader-content {
  font-family: var(--sans);
  font-size: clamp(16px, 3.7vw, 18px);
  line-height: 1.95;
}

.grading-reader .reader-content h2,
.grading-reader .reader-content h3 {
  margin: 1.8em 0 0.6em;
  color: #4a3214;
  font-family: var(--serif);
  line-height: 1.45;
}

.grading-reader .reader-content h2 {
  font-size: 22px;
}

.grading-reader .reader-content h3 {
  font-size: 18px;
}

.grading-reader .reader-content p {
  text-indent: 0;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 28px 26px 14px;
}

.section-title span {
  width: 4px;
  height: 20px;
  background: var(--gold);
}

.section-title h2 {
  margin: 0;
  color: #f7eedb;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
}

.essay-list {
  display: grid;
  gap: 14px;
  padding: 8px 26px 30px;
}

.essay-card {
  display: grid;
  grid-template-columns: 48px 1fr 20px;
  gap: 12px;
  align-items: center;
  min-height: 96px;
  padding: 18px 0;
  border-top: 1px solid rgba(212, 175, 55, 0.18);
  color: #f3ead9;
}

.essay-card:first-child {
  border-top: 0;
}

.essay-card:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.essay-card:hover strong {
  color: var(--gold-bright);
}

.card-index {
  display: grid;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(212, 175, 55, 0.55);
  color: var(--gold);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
}

.card-body {
  display: grid;
  gap: 8px;
}

.card-body strong {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
  transition: color 180ms ease;
}

.card-body span {
  color: rgba(234, 225, 212, 0.62);
  font-size: 14px;
  line-height: 1.65;
}

.card-summary {
  display: grid;
  gap: 0;
}

.card-summary .score-line {
  color: #e1cb89;
}

.card-arrow {
  color: var(--gold);
  font-size: 24px;
}

.article-mode {
  background:
    linear-gradient(180deg, rgba(212, 175, 55, 0.12), transparent 220px),
    var(--paper);
  color: var(--ink);
}

.article-page {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 22px 116px;
}

.article-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto 18px;
  color: #6b521b;
  font-size: 14px;
}

.article-topbar a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.reader {
  border: 1px solid var(--line-light);
  background:
    linear-gradient(90deg, rgba(212, 175, 55, 0.08), transparent 26%),
    #fffaf0;
  padding: clamp(28px, 7vw, 56px);
  box-shadow: 0 18px 44px rgba(70, 47, 12, 0.08);
}

.reader-header h1 {
  margin: 0;
  color: #332414;
  font-family: var(--serif);
  font-size: clamp(30px, 7.6vw, 48px);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: 0;
}

.byline {
  margin: 16px 0 0;
  color: var(--muted-ink);
  font-size: 15px;
  line-height: 1.75;
  white-space: pre-line;
}

.reader-divider {
  width: 68px;
  height: 1px;
  margin: 30px 0 34px;
  background: var(--gold);
}

.reader-content {
  color: #30271c;
  font-family: var(--serif);
  font-size: clamp(18px, 4.2vw, 21px);
  line-height: 2.05;
}

.reader-content p {
  margin: 0 0 1.25em;
  text-indent: 2em;
}

.reader-content p:last-child {
  margin-bottom: 0;
}

.source-note {
  margin: 32px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line-light);
  color: var(--muted-ink);
  font-size: 13px;
  line-height: 1.7;
}

.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.article-nav a,
.article-nav span {
  min-height: 52px;
}

.article-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(92, 69, 28, 0.22);
  background: rgba(255, 250, 240, 0.68);
  color: #5f4513;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
}

@media (min-width: 720px) {
  .home-header {
    padding-top: 42px;
  }
}
