:root {
  --bg: #0a0a0c;
  --bg-elevated: #131318;
  --bg-card: rgba(255,255,255,0.03);
  --ink: #c8c5be;
  --ink-bright: #e8e5df;
  --muted: #5e5c56;
  --line: #222228;
  --link: #c9a87c;
  --luke-accent: #c9a87c;
  --chat-accent: #6b8aad;
  --golden: #d4b896;
  --golden-glow: rgba(212,184,150,0.08);
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--link); }

/* ── Header ── */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px 24px 18px;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-size: 17px;
  color: var(--ink-bright);
  letter-spacing: 0.02em;
}
.site-nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
  font-family: var(--sans);
}

/* ── Layout ── */
.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Hero ── */
.hero {
  padding: clamp(64px, 11vw, 132px) 24px clamp(48px, 8vw, 84px);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(107,138,173,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 860px;
  margin: 0 auto;
  position: relative;
}
.kicker, .meta, .section-kicker {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 22px;
  font-size: clamp(40px, 7vw, 82px);
  font-weight: 500;
  line-height: 1.18;
  color: var(--ink-bright);
}
.hero p {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(18px, 2.5vw, 23px);
}

/* ── Sections ── */
.section {
  padding: 54px 0;
  border-bottom: 1px solid var(--line);
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.section h2 {
  margin-bottom: 0;
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 500;
  color: var(--ink-bright);
}

/* ── Lists ── */
.chapter-list, .post-list, .category-list {
  display: grid;
  gap: 1px;
  padding: 0;
  margin: 0;
  list-style: none;
  background: var(--line);
  border: 1px solid var(--line);
}
.chapter-list li, .post-card, .category-list li {
  background: var(--bg-card);
  padding: 24px;
  transition: background 0.2s;
}
.chapter-list li:hover, .post-card:hover, .category-list li:hover {
  background: rgba(255,255,255,0.05);
}
.chapter-list a, .post-card a, .category-list a {
  display: grid;
  gap: 8px;
}
.post-card h3, .category-list strong {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  color: var(--ink-bright);
}
.post-card p, .category-list span {
  margin: 0;
  color: var(--muted);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.category-grid a {
  min-height: 132px;
  padding: 20px;
  background: var(--bg-card);
  font-size: 18px;
}

/* ── Article ── */
.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 58px 24px 72px;
}
.article h1 {
  font-size: clamp(34px, 5vw, 58px);
}
.article .summary {
  color: var(--muted);
  font-size: 19px;
}
.article-body {
  margin-top: 46px;
  font-size: 19px;
}
.article-body h2 { margin-top: 42px; font-size: 28px; font-weight: 500; color: var(--ink-bright); }
.article-body p { margin-bottom: 1.15em; }
.article-body ul { padding-left: 1.3em; }
.article-body blockquote {
  margin: 2em 0;
  padding-left: 1.2em;
  border-left: 2px solid var(--line);
  color: var(--muted);
}

/* ── Dialogue ── */
.dialogue {
  margin: 48px 0;
}
.dialogue .speaker {
  margin-bottom: 36px;
  padding: 20px 24px;
  border-radius: 6px;
  line-height: 1.9;
  position: relative;
}
.dialogue .speaker .name {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--sans);
}
.dialogue .luke {
  background: var(--golden-glow);
  border-left: 3px solid rgba(201,168,124,0.35);
}
.dialogue .luke .name {
  color: var(--luke-accent);
}
.dialogue .chat {
  background: rgba(107,138,173,0.05);
  border-left: 3px solid rgba(107,138,173,0.25);
}
.dialogue .chat .name {
  color: var(--chat-accent);
}

/* ── Golden sentences ── */
.golden {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--golden);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  color: var(--golden);
}

/* ── Epigraph ── */
.epigraph {
  margin: 48px 0;
  padding: 0 0 0 20px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  font-style: italic;
  line-height: 1.9;
}
.epigraph.coda {
  margin-top: 72px;
  padding: 32px 0;
  text-align: center;
  border-left: none;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-style: normal;
}
.epigraph.coda p {
  font-size: 16px;
  letter-spacing: 0.04em;
}
.epigraph.coda .latin {
  margin-top: 12px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--muted);
  opacity: 0.7;
}

/* ── Article nav ── */
.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 54px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--sans);
}

/* ── Source link ── */
.source-link {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
  font-style: italic;
}

/* ── About page ── */
.about-body p {
  font-size: 20px;
  line-height: 2;
  margin-bottom: 1.4em;
}
.about-body .about-sig {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--ink-bright);
  font-size: 18px;
  font-style: normal;
}
.about-body .about-date {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  color: var(--muted);
}

/* ── Footer ── */
.site-footer {
  max-width: 1040px;
  margin: 0 auto;
  padding: 34px 24px 48px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 14px;
  border-top: 1px solid var(--line);
}
.site-footer p {
  margin: 0 0 6px;
}
.last-updated {
  margin-top: 12px;
  font-size: 13px;
  opacity: 0.7;
}



/* ── Visitor Banner ── */
.visitor-banner {
  background: rgba(201,168,124,0.04);
  border-bottom: 1px solid var(--line);
  padding: 16px 24px;
  text-align: center;
  animation: fadeInBanner 1.2s ease-out;
}
@keyframes fadeInBanner {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.visitor-banner-inner {
  max-width: 720px;
  margin: 0 auto;
}
.visitor-text {
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.02em;
  line-height: 1.8;
  font-family: var(--sans);
}
.visitor-num {
  color: var(--luke-accent);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  min-width: 1.2em;
  display: inline-block;
  text-align: center;
}
/* ── Responsive ── */
@media (max-width: 760px) {
  .site-header, .section-head, .article-nav {
    align-items: flex-start;
    flex-direction: column;
  }
  .site-nav { flex-wrap: wrap; }
  .hero { padding-top: 54px; }
  .category-grid { grid-template-columns: 1fr; }
  .chapter-list li, .post-card, .category-list li { padding: 20px; }
  .article { padding-top: 42px; }
  .article-body { font-size: 18px; }
  .dialogue .speaker { padding: 16px 18px; }
}

.article-body .source { color: var(--muted); font-size: 15px; font-style: italic; margin-top: 48px; }


/* ═══════════════════════════════════════════
   Experimental Enhancements - 2026-06-04
   ═══════════════════════════════════════════ */

/* ── Tagline on homepage ── */
.tagline-block {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.tagline-block p {
  color: var(--muted);
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.9;
  margin: 0;
  font-style: italic;
  letter-spacing: 0.01em;
}

/* ── Book-style chapter list ── */
.chapter-list {
  counter-reset: chapter;
}
.chapter-list li {
  counter-increment: chapter;
  position: relative;
}
.chapter-list li .meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  font-family: var(--sans);
  flex-shrink: 0;
}
.chapter-list li a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 4px;
  transition: background 0.2s;
}
.chapter-list li a:hover {
  background: var(--bg-card);
}
.chapter-list li strong {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-bright);
  font-family: var(--sans);
}

/* ── Post list as compact book index ── */
.post-list {
  display: grid;
  gap: 1px;
  padding: 0;
  margin: 0;
  list-style: none;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.post-card {
  background: var(--bg);
  padding: 18px 22px;
  transition: background 0.2s;
}
.post-card:hover {
  background: var(--bg-card);
}
.post-card a {
  display: block;
}
.post-card .meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
  font-family: var(--sans);
  letter-spacing: 0.03em;
}
.post-card h3 {
  font-size: 17px;
  font-weight: 500;
  color: var(--ink-bright);
  margin: 0 0 4px;
  line-height: 1.4;
  font-family: var(--serif);
}
.post-card p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* ── Reading experience improvements ── */
.article-body {
  max-width: 700px;
  margin: 0 auto;
}
.article-body p {
  font-size: 18px;
  line-height: 1.9;
  margin-bottom: 1.2em;
  color: var(--ink);
}
.article-body h2 {
  margin-top: 48px;
  font-size: 26px;
  font-weight: 500;
  color: var(--ink-bright);
  font-family: var(--sans);
  letter-spacing: -0.01em;
}
.article-body blockquote {
  font-size: 17px;
  line-height: 1.8;
  padding: 16px 22px;
  margin: 24px 0;
}

/* ── Echo page ── */
.echo-intro {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
}
.echo-intro p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}
.echo-form {
  max-width: 560px;
  margin: 0 auto 48px;
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.echo-form label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
  font-family: var(--sans);
  letter-spacing: 0.03em;
}
.echo-form input,
.echo-form textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 10px 14px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 15px;
  margin-bottom: 18px;
  transition: border-color 0.2s;
}
.echo-form input:focus,
.echo-form textarea:focus {
  outline: none;
  border-color: var(--link);
}
.echo-form textarea {
  min-height: 120px;
  resize: vertical;
}
.echo-form button {
  background: var(--link);
  color: #0a0a0c;
  border: none;
  padding: 10px 28px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  border-radius: 3px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.echo-form button:hover {
  opacity: 0.85;
}
.echo-form .hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: -12px;
  margin-bottom: 18px;
  font-family: var(--sans);
}
.echo-messages {
  max-width: 640px;
  margin: 0 auto;
}
.echo-letter {
  padding: 24px 28px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-card);
  position: relative;
}
.echo-letter::before {
  content: "✉";
  position: absolute;
  top: -10px;
  left: -10px;
  font-size: 18px;
  opacity: 0.2;
}
.echo-letter .letter-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
}
.echo-letter .letter-name {
  color: var(--link);
  font-weight: 500;
}
.echo-letter .letter-body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink);
  white-space: pre-wrap;
}
.echo-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
  font-style: italic;
}

/* ── Admin page ── */
.echo-admin {
  max-width: 700px;
  margin: 0 auto;
}
.echo-admin h2 {
  font-size: 18px;
  font-weight: 500;
  color: var(--ink-bright);
  margin-top: 32px;
  margin-bottom: 12px;
  font-family: var(--sans);
}
.echo-admin .pending-item {
  padding: 16px 20px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-card);
}
.echo-admin .pending-item .meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  font-family: var(--sans);
}
.echo-admin .pending-item .body {
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 10px;
  color: var(--ink);
}
.echo-admin .pending-item .actions {
  display: flex;
  gap: 8px;
}
.echo-admin .pending-item .actions button {
  padding: 5px 14px;
  font-family: var(--sans);
  font-size: 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 2px;
  cursor: pointer;
}
.echo-admin .pending-item .actions button:hover {
  border-color: var(--link);
  color: var(--link);
}
.echo-admin .pending-item .actions button.publish-btn {
  background: var(--link);
  color: #0a0a0c;
  border-color: var(--link);
}
.echo-login {
  max-width: 400px;
  margin: 48px auto;
  text-align: center;
}
.echo-login input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 10px 14px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  margin-bottom: 14px;
}
.echo-login button {
  background: var(--link);
  color: #0a0a0c;
  border: none;
  padding: 10px 28px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  border-radius: 3px;
  cursor: pointer;
}

/* ── Responsive refinements ── */
@media (max-width: 600px) {
  .article-body p { font-size: 16px; }
  .post-card { padding: 14px 16px; }
  .post-card h3 { font-size: 15px; }
  .echo-form { padding: 20px; }
  .echo-letter { padding: 18px 20px; }
  .chapter-list li a { padding: 10px 14px; }
}
