:root {
  --bg: #f5f1ea;
  --panel: #fffdf8;
  --text: #1f1f1c;
  --muted: #6e685d;
  --line: #ded5c8;
  --accent: #9b3d1f;
  --accent-soft: #efe0d8;
  --shadow: 0 12px 30px rgba(31, 31, 28, 0.08);
  --font-sans: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-serif: "Iowan Old Style", "Georgia", serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background:
    radial-gradient(circle at top right, rgba(155, 61, 31, 0.09), transparent 28%),
    linear-gradient(180deg, #f8f5ef 0%, var(--bg) 100%);
  color: var(--text);
  font-family: var(--font-sans);
}
a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; display: block; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
pre { white-space: pre-wrap; word-break: break-word; margin: 0; font-size: 0.85rem; }
input, textarea, button {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  font: inherit;
  background: white;
}
textarea { min-height: 120px; resize: vertical; }
button {
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
}
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.stack { display: grid; gap: 1rem; }
.grid { display: grid; gap: 1rem; }
.inline-form { display: inline-block; margin-right: 0.8rem; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  background: var(--panel);
  border: 1px solid rgba(222, 213, 200, 0.85);
  border-radius: 18px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
}
.label, .muted { color: var(--muted); }
.alert {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: #f7dfd7;
  color: #7b2710;
}
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}
.auth-card { width: min(100%, 420px); }
.admin-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}
.sidebar {
  border-right: 1px solid var(--line);
  padding: 1.4rem;
  background: rgba(255,255,255,0.45);
  backdrop-filter: blur(8px);
}
.brand {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  margin-bottom: 1.4rem;
}
.admin-nav {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1.4rem;
}
.admin-nav a {
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  color: var(--text);
}
.admin-nav a:hover { background: var(--accent-soft); }
.admin-main { padding: 1.5rem; display: grid; gap: 1rem; }
.public-shell, .article-shell { width: min(100%, 860px); margin: 0 auto; padding: 1.5rem; }
.hero {
  padding: 4rem 0 2rem;
}
.hero h1, .article-shell h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
  margin: 0.3rem 0 1rem;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-size: 0.8rem;
}
.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 58ch;
}
.article-list { display: grid; gap: 1rem; padding-bottom: 3rem; }
.article-body {
  font-family: var(--font-serif);
  line-height: 1.8;
  font-size: 1.12rem;
}
.back-link { display: inline-block; margin: 2rem 0 1rem; }
.cover-image {
  border-radius: 18px;
  margin: 1.4rem 0 2rem;
  box-shadow: var(--shadow);
}
.article-figure {
  margin: 2rem 0;
}
.article-inline-image {
  border-radius: 18px;
  box-shadow: var(--shadow);
}
@media (max-width: 920px) {
  .admin-shell { grid-template-columns: 1fr; }
  .cols-2, .cols-4 { grid-template-columns: 1fr; }
}
