:root {
  --bg: #0b0a0c;
  --panel: #151319;
  --panel-2: #1b171d;
  --text: #eee7db;
  --muted: #a9a097;
  --gold: #c7a15d;
  --gold-soft: #8e7345;
  --red: #7e3131;
  --green: #57715e;
  --border: rgba(199, 161, 93, 0.32);
  --max: 1160px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(126, 49, 49, 0.12), transparent 34%),
    linear-gradient(180deg, #08080a 0%, var(--bg) 100%);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: rgba(8, 8, 10, 0.94);
  backdrop-filter: blur(10px);
}

.site-header__inner {
  width: min(var(--max), calc(100% - 2rem));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.95rem;
  font-weight: 700;
}

.main-nav {
  display: flex;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--gold);
}

.site-main {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  padding: 5rem 0 3rem;
}

.eyebrow,
.archive-number,
.note-label,
.filters-title {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  font-weight: 700;
}

.hero h1,
.article-header h1 {
  margin: 0.35rem 0 1rem;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  line-height: 1;
}

.hero__intro,
.article-lead {
  max-width: 760px;
  margin: 0;
  color: #d6cec2;
  font-size: 1.18rem;
}

.archive-controls {
  margin-bottom: 2.5rem;
  padding: 1.35rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(21, 19, 25, 0.92);
}

.search-box input {
  width: 100%;
  min-height: 48px;
  padding: 0 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0f0e12;
  color: var(--text);
  font: inherit;
}

.search-box input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.filters-block { margin-top: 1.25rem; }
.filters { display: flex; flex-wrap: wrap; gap: 0.55rem; }

.filters-block--primary {
  padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(199, 161, 93, 0.18);
}

.filters-block--secondary {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 10px;
  background: rgba(8, 8, 10, 0.46);
}

.filter-button,
.tag {
  display: inline-block;
  padding: 0.34rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(199, 161, 93, 0.05);
  color: var(--gold);
  font-size: 0.8rem;
}

.filter-button {
  font: inherit;
  cursor: pointer;
}

.category-filter {
  padding: 0.58rem 0.9rem;
  font-weight: 700;
}

.filter-count {
  display: inline-grid;
  min-width: 1.5rem;
  min-height: 1.5rem;
  margin-left: 0.3rem;
  place-items: center;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.72rem;
}

.filter-button:hover,
.filter-button.active {
  border-color: var(--gold);
  background: var(--gold);
  color: #111015;
}

.filter-button:focus-visible,
.relation-tag:focus-visible,
.text-button:focus-visible,
.archive-card a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.controls-footer {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.results-count { margin: 0; color: var(--muted); font-size: 0.9rem; }

.active-filters {
  margin: 0 0 0.15rem;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
}

.text-button {
  border: 0;
  background: none;
  color: var(--gold);
  font: inherit;
  cursor: pointer;
}

.text-button:hover { text-decoration: underline; }

.archives-list {
  display: grid;
  gap: 1.4rem;
  padding-bottom: 4rem;
}

.archive-card {
  display:grid;
  grid-template-columns:220px minmax(0,1fr);
  gap:20px;
  overflow:hidden;
  border:1px solid var(--border);
  border-radius:12px;
  background:linear-gradient(135deg,var(--panel),var(--panel-2));
}

.archive-card[hidden] { display: none; }

.archive-card__image{
  width:220px;
  height:220px;
  object-fit:cover;
  border-radius:10px;
  margin:12px 0 12px 12px;
  background:#201d24;
}

.archive-card__body{
  min-width:0;
  padding:1.25rem 1.35rem 1.25rem 0;
}

.archive-card__category {
  margin-top: 0.65rem !important;
  color: var(--gold) !important;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.archive-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.archive-card h2 {
  margin: 0.45rem 0;
  font-size: 1.75rem;
  line-height: 1.2;
}

.archive-card p {
  margin: 0;
  color: #cfc6ba;
}

.archive-card__tags {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.relation-tag {
  font: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.relation-tag:hover {
  border-color: var(--gold);
  background: rgba(199, 161, 93, 0.14);
  color: var(--text);
}

.archive-card__link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--gold);
}

.empty-state,
.error-state {
  margin-bottom: 4rem;
  padding: 2rem;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--muted);
}

.article-shell {
  width: min(900px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 5rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--gold);
}

.article-document {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
}

.article-header {
  padding: 2.5rem 2.5rem 2rem;
}

.article-date {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.article-tags {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.article-cover {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

.article-content {
  padding: 2rem 2.5rem 3rem;
}

.article-content h2 {
  margin-top: 2.5rem;
  color: #f1e9dd;
}

.dropcap::first-letter {
  float: left;
  margin: 0.12rem 0.55rem 0 0;
  color: var(--gold);
  font-size: 4rem;
  line-height: 0.8;
}

.council-note,
.author-note,
.confidential-note {
  margin: 1.8rem 0;
  padding: 1.15rem 1.25rem;
  border-radius: 8px;
}

.council-note {
  border: 1px solid var(--border);
  background: #1a1715;
}

.author-note {
  border: 1px solid rgba(87, 113, 94, 0.7);
  background: #131a15;
}

.confidential-note {
  border: 1px solid rgba(126, 49, 49, 0.8);
  background: #241313;
}

.site-footer {
  padding: 2rem 1rem 3rem;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

@media (max-width:720px){
.site-header__inner{flex-direction:column;justify-content:center;padding:.75rem 0;}
.archive-controls{padding:1rem;}
.category-filters,.theme-filters{flex-wrap:nowrap;overflow-x:auto;padding:.2rem 0 .65rem;scrollbar-width:thin;}
.category-filter,.theme-filter{flex:0 0 auto;}
.controls-footer{align-items:flex-start;flex-direction:column;}
.archive-card{grid-template-columns:1fr;gap:0;}
.archive-card__image{width:calc(100% - 24px);height:240px;margin:12px;}
.archive-card__body{padding:1rem 1.25rem 1.5rem;}
.article-header,.article-content{padding-left:1.25rem;padding-right:1.25rem;}
}
