:root {
  --ink: #090908;
  --text: #fff8e8;
  --muted: #c6b998;
  --line: rgba(213, 165, 42, 0.34);
  --paper: #090908;
  --soft: #17140f;
  --card: #14110d;
  --sage: #8a6a22;
  --terra: #b68a22;
  --sky: #201a10;
  --gold: #d5a52a;
  --gold-bright: #f0c85a;
  --white: #fff8e8;
  --danger: #a43c35;
  --ok: #326b4b;
  --shadow: 0 16px 40px rgba(38, 42, 36, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  color: var(--text);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
}

a {
  color: inherit;
  text-decoration-color: rgba(88, 111, 98, 0.35);
  text-underline-offset: 0.18em;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  background: var(--soft);
}

button,
.button {
  appearance: none;
  border: 0;
  border-radius: 6px;
  background: var(--gold);
  color: #090908;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 750;
  min-height: 44px;
  padding: 0.75rem 1rem;
  text-decoration: none;
}

.button.secondary {
  background: #242016;
  color: var(--white);
  border: 1px solid var(--line);
}

.site-header {
  align-items: center;
  background: rgba(9, 9, 8, 0.97);
  border-bottom: 1px solid rgba(213, 165, 42, 0.35);
  color: var(--white);
  display: flex;
  gap: 1.25rem;
  justify-content: space-between;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  align-items: center;
  display: grid;
  grid-template-columns: 44px auto;
  column-gap: 0.75rem;
  min-width: 13rem;
  text-decoration: none;
}

.brand img {
  border-radius: 50%;
  grid-row: span 2;
  height: 44px;
  object-fit: cover;
  width: 44px;
}

.brand span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.36rem;
  font-weight: 700;
  color: var(--gold-bright);
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.site-header nav,
.site-footer nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  justify-content: flex-end;
}

.site-header nav a,
.site-footer nav a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.93rem;
  font-weight: 700;
  text-decoration: none;
}

.brand-banner {
  background: #080807;
  border-bottom: 1px solid rgba(213, 165, 42, 0.45);
  overflow: hidden;
}

.brand-banner img {
  aspect-ratio: 2172 / 724;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.category-strip {
  align-items: center;
  background: #11100e;
  border-bottom: 1px solid rgba(213, 165, 42, 0.28);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  padding: 0.7rem 1rem;
  position: sticky;
  top: 77px;
  z-index: 15;
}

.category-strip a {
  border: 1px solid rgba(213, 165, 42, 0.45);
  border-radius: 999px;
  color: #f4e4bd;
  font-size: 0.82rem;
  font-weight: 850;
  padding: 0.46rem 0.8rem;
  text-decoration: none;
  text-transform: uppercase;
}

.category-strip a:hover {
  background: var(--gold);
  color: var(--ink);
}

main {
  background: radial-gradient(circle at top, rgba(213, 165, 42, 0.10), transparent 30rem);
  margin: 0 auto;
  max-width: 1240px;
  padding: clamp(1rem, 3vw, 2rem);
}

.hero {
  align-items: stretch;
  display: grid;
  gap: clamp(1rem, 3vw, 2rem);
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  min-height: 480px;
}

.hero-media {
  background: #0f0d0a;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 420px;
  overflow: hidden;
}

.hero-media img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.hero-copy {
  align-self: center;
  padding: 1rem 0;
}

.kicker {
  color: var(--gold-bright);
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  margin-bottom: 0.55rem;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.1;
  margin: 0 0 0.75rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 8vw, 5.2rem);
  margin-bottom: 1rem;
}

.hero h2 {
  font-size: clamp(1.55rem, 4vw, 2.35rem);
}

.hero p,
.dek {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 62ch;
}

.text-link {
  color: var(--gold-bright);
  font-weight: 800;
}

.section-head {
  align-items: end;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: clamp(2rem, 5vw, 4rem) 0 1rem;
}

.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.post-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-card,
.category-tile,
.admin-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.post-card {
  display: grid;
  overflow: hidden;
}

.thumb {
  background: #0f0d0a;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.thumb img,
.mini img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.post-card > div {
  padding: 1rem;
}

.post-card h3 {
  font-size: 1.38rem;
}

.post-card p,
.meta,
.result-note {
  color: var(--muted);
}

.meta {
  font-size: 0.88rem;
  font-weight: 700;
}

.band {
  align-items: center;
  background: linear-gradient(135deg, #1c1710, #0d0c0a);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr minmax(260px, 0.6fr);
  margin: clamp(2rem, 5vw, 4rem) 0;
  padding: clamp(1.25rem, 4vw, 2.5rem);
}

.newsletter form,
.search-form {
  display: flex;
  gap: 0.5rem;
}

input,
select,
textarea {
  background: #0f0d0a;
  border: 1px solid rgba(213, 165, 42, 0.45);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  padding: 0.72rem 0.8rem;
  width: 100%;
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

.category-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.category-tile {
  min-height: 180px;
  padding: 1.2rem;
  text-decoration: none;
}

.category-tile span {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
}

.category-tile p,
.category-tile em {
  color: var(--muted);
}

.rail {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mini a {
  display: grid;
  gap: 0.5rem;
  text-decoration: none;
}

.mini img {
  aspect-ratio: 4 / 3;
  border-radius: 8px;
}

.mini span {
  color: var(--gold-bright);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.narrow {
  margin-left: auto;
  margin-right: auto;
  max-width: 820px;
}

.page-title {
  padding: clamp(2rem, 6vw, 4rem) 0 1.5rem;
}

.page-title h1,
.article-head h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
}

.breadcrumbs,
.byline {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.article-head {
  padding: clamp(1.5rem, 4vw, 3rem) 0 1rem;
}

.featured {
  margin: 1rem 0 1.5rem;
}

.featured img {
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  object-fit: cover;
  width: 100%;
}

.featured figcaption {
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 0.45rem;
}

.toc,
.faq,
.link-list {
  background: #14110d;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 1.5rem 0;
  padding: 1rem 1.2rem;
}

.toc ol {
  margin-bottom: 0;
}

.toc-l3 {
  margin-left: 1.2rem;
}

.prose {
  font-size: 1.08rem;
}

.prose h2 {
  font-size: 2rem;
  margin-top: 2.1rem;
}

.prose h3 {
  font-size: 1.45rem;
  margin-top: 1.4rem;
}

.prose p,
.prose li {
  color: #f1e8d4;
}

.prose a {
  color: var(--gold-bright);
  font-weight: 700;
}

.faq details {
  border-top: 1px solid rgba(213, 165, 42, 0.28);
  padding: 0.8rem 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 800;
}

.related {
  margin: 0 auto;
  max-width: 1240px;
}

.pagination {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0;
}

.site-footer {
  align-items: start;
  background: #050504;
  border-top: 1px solid rgba(213, 165, 42, 0.35);
  color: var(--white);
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  margin-top: 3rem;
  padding: 2rem clamp(1rem, 4vw, 3rem);
}

.site-footer p,
.site-footer a {
  color: rgba(255, 255, 255, 0.72);
}

.admin-body {
  background: #090908;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-nav {
  background: var(--ink);
  color: var(--white);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem;
}

.admin-nav a {
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.82);
  padding: 0.7rem 0.8rem;
  text-decoration: none;
}

.admin-brand {
  color: var(--white) !important;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.admin-main {
  max-width: 1280px;
  padding: 1.5rem;
  width: 100%;
}

.admin-login {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.admin-login form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 1rem;
  max-width: 420px;
  padding: 1.5rem;
  width: calc(100% - 2rem);
}

.admin-head {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.admin-card {
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  padding: 1rem;
}

.stats {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stats div {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
}

.stats strong {
  display: block;
  font-size: 2rem;
}

table {
  border-collapse: collapse;
  width: 100%;
}

td,
th {
  border-bottom: 1px solid var(--line);
  padding: 0.7rem;
  text-align: left;
  vertical-align: top;
}

.admin-form {
  display: grid;
  gap: 1rem;
}

.admin-form.two-col {
  align-items: start;
  grid-template-columns: minmax(0, 1fr) 360px;
}

.admin-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 750;
}

.admin-form small {
  color: var(--muted);
  font-weight: 500;
}

.checklist {
  list-style: none;
  padding-left: 0;
}

.checklist li {
  border-bottom: 1px solid var(--line);
  padding: 0.45rem 0;
}

.checklist li::before {
  content: "Check";
  color: var(--muted);
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 850;
  margin-right: 0.5rem;
  text-transform: uppercase;
  width: 3.4rem;
}

.checklist .ok::before {
  color: var(--ok);
  content: "Pass";
}

.checklist .bad::before {
  color: var(--danger);
  content: "Fix";
}

.notice {
  background: #0f2418;
  border: 1px solid #326b4b;
  border-radius: 6px;
  color: #a7e3ba;
  padding: 0.8rem 1rem;
}

.error {
  background: #2a100f;
  border: 1px solid #a43c35;
  border-radius: 6px;
  color: #ffb8b2;
  padding: 0.8rem 1rem;
}

.media-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.media-grid figure {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0;
  overflow: hidden;
}

.media-grid img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

.media-grid figcaption {
  color: var(--muted);
  font-size: 0.85rem;
  padding: 0.6rem;
}

@media (max-width: 900px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header nav,
  .site-footer nav {
    justify-content: flex-start;
  }

  .hero,
  .band,
  .admin-form.two-col,
  .admin-body {
    grid-template-columns: 1fr;
  }

  .hero-media {
    min-height: auto;
  }

  .post-grid,
  .category-grid,
  .rail,
  .stats,
  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 620px) {
  main {
    padding: 1rem;
  }

  .post-grid,
  .category-grid,
  .rail,
  .stats,
  .media-grid {
    grid-template-columns: 1fr;
  }

  .newsletter form,
  .search-form,
  .admin-head {
    align-items: stretch;
    flex-direction: column;
  }

  table {
    display: block;
    overflow-x: auto;
  }
}
