:root {
  color-scheme: light;
  --bg: #f4efe7;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-border: rgba(44, 32, 24, 0.1);
  --text: #1f1a17;
  --muted: #6a625c;
  --accent: #5a3d2b;
  --accent-2: #9e6a49;
  --shadow: 0 18px 50px rgba(34, 22, 15, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.65;
  background:
    radial-gradient(circle at top left, rgba(158, 106, 73, 0.16), transparent 30%),
    radial-gradient(circle at top right, rgba(90, 61, 43, 0.12), transparent 28%),
    linear-gradient(180deg, #faf6f1 0%, var(--bg) 100%);
}

a {
  color: inherit;
}

button {
  font: inherit;
}

.site-shell {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header {
  padding: 3rem 0 1rem;
}

.site-title {
  margin: 0;
  font-size: clamp(2.25rem, 6vw, 4.25rem);
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.eyebrow {
  margin: 0 0 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
  color: var(--accent-2);
}

.site-tagline {
  margin: 0.75rem 0 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.06rem;
}

.site-main {
  padding: 1rem 0 3rem;
}

.site-footer {
  padding: 0 0 2rem;
  color: var(--muted);
}

.status,
.error,
.empty-state {
  padding: 1rem 1.1rem;
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.error {
  border-color: rgba(138, 34, 34, 0.22);
  color: #7d2020;
}

.category-group {
  margin: 2rem 0 2.5rem;
  padding: 1.2rem 1.2rem 1rem;
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.category-title {
  margin: 0 0 0.85rem;
  font-size: 1.45rem;
}

.story-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.story-item {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
  padding: 0.6rem 0;
  border-top: 1px solid rgba(44, 32, 24, 0.08);
}

.story-item:first-child {
  border-top: 0;
}

.story-link,
.category-link,
.back-link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--accent);
  cursor: pointer;
  text-align: left;
}

.story-link {
  font-size: 1.06rem;
  font-weight: 700;
}

.story-link:hover,
.category-link:hover,
.back-link:hover {
  text-decoration: underline;
}

.story-meta {
  color: var(--muted);
  font-size: 0.94rem;
}

.article-view {
  margin-top: 1.25rem;
  padding: 1.35rem 1.35rem 1.6rem;
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.article-view h2 {
  margin-top: 0;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.08;
}

.article-body {
  max-width: 72ch;
}

.article-body img {
  max-width: 100%;
  height: auto;
}

.article-body pre {
  overflow: auto;
  padding: 1rem;
  border-radius: 16px;
  background: rgba(18, 13, 10, 0.92);
  color: #f7efe9;
}

.article-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95em;
}

.article-body blockquote {
  margin-left: 0;
  padding-left: 1rem;
  border-left: 4px solid rgba(90, 61, 43, 0.35);
  color: var(--muted);
}

@media (max-width: 640px) {
  .site-header {
    padding-top: 2rem;
  }

  .category-group,
  .article-view {
    padding: 1rem;
    border-radius: 18px;
  }
}
