:root {
  --bg: #0B0D10;
  --surface: #1B1E22;
  --surface-2: #21120f;
  --accent: #C7351A;
  --link: #4F83FF;
  --warm: #F2A51A;
  --text: #F4F1EA;
  --muted: #A7ADB7;
  --subtle: #555C66;
  --border: rgba(244, 241, 234, 0.16);
  --max: 1120px;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
}

img, iframe { max-width: 100%; }

a {
  color: inherit;
  text-decoration: none;
}

.site-main {
  min-height: 70vh;
  padding-top: 96px;
}

.header-bar {
  min-height: 72px;
  padding: 0 28px;
  background: rgba(11, 13, 16, 0.96);
  border-bottom: 2px solid var(--accent);
  display: flex;
  align-items: center;
  gap: 24px;
  z-index: 10;
}

.brand-lockup {
  display: inline-flex;
  flex-direction: column;
  min-width: 210px;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
}

.brand-title {
  font-family: Merriweather, Georgia, serif;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
}

.brand-subtitle {
  color: rgba(255,255,255,.78);
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.primary-nav {
  display: flex;
  gap: 4px;
  overflow: visible;
  flex: 1;
}

.primary-nav .pure-menu-link,
.archive-action {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.primary-nav .pure-menu-link:hover,
.archive-action:hover {
  color: var(--warm);
  background: transparent;
}

.has-dropdown { position: relative; }

.dropdown-menu {
  position: absolute;
  display: none;
  min-width: 220px;
  top: 100%;
  left: 0;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 8px 10px;
  color: var(--text);
}

.dropdown-menu a:hover {
  color: var(--link);
}

.archive-action {
  border: 1px solid var(--border);
  padding: 7px 10px;
}

.home-hero,
.page-shell {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

.home-hero {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 380px);
  gap: 32px;
  align-items: end;
  padding: 48px 0 26px;
}

.home-hero h1,
.section-header h1,
.article-header h1,
.prose h1 {
  margin: 0;
  font-family: Merriweather, Georgia, serif;
  font-size: clamp(2.1rem, 4vw, 3.25rem);
  line-height: 1.16;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--warm);
  font-size: .74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-copy,
.section-header p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
}

.archive-search {
  display: flex;
  border-bottom: 1px solid var(--accent);
}

.archive-search input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  color: var(--text);
  padding: 10px 0;
}

.archive-search button,
.outline-button {
  background: transparent;
  color: var(--warm);
  border: 1px solid var(--border);
  font-weight: 800;
}

.archive-list,
.article-panel {
  background: var(--surface);
  border: 1px solid var(--accent);
  border-left-width: 12px;
  padding: clamp(24px, 5vw, 54px);
}

.listing-shell,
.article-shell {
  gap: 28px;
}

.narrow-shell {
  max-width: 880px;
}

.section-header {
  margin-bottom: 24px;
}

.prose {
  color: #D8D4CC;
}

.prose p,
.archive-list p {
  margin: 0 0 1.15rem;
}

.prose h2,
.prose h3,
.archive-list h2,
.archive-list h3 {
  color: var(--text);
  font-family: Merriweather, Georgia, serif;
  line-height: 1.25;
  margin: 2rem 0 .85rem;
}

.site-prose a,
.prose a,
.archive-list a,
.site-block--paragraph a,
.category-intro a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: rgba(79, 131, 255, .45);
  text-underline-offset: 3px;
}

.site-prose a:hover,
.prose a:hover,
.archive-list a:hover,
.site-block--paragraph a:hover,
.category-intro a:hover {
  color: var(--warm);
  text-decoration-color: var(--warm);
}

.content-list {
  padding-left: 1.35rem;
}

blockquote {
  margin: 1.5rem 0;
  padding: .7rem 0 .7rem 1.2rem;
  border-left: 4px solid var(--accent);
  color: #F8DCD7;
  font-family: Merriweather, Georgia, serif;
  font-style: italic;
}

.content-figure {
  margin: 1.5rem 0;
}

.content-figure img,
.gallery-grid img,
.main-image img,
.visual-rail img,
.category-card img {
  display: block;
  height: auto;
  border: 1px solid var(--border);
}

figcaption {
  color: var(--muted);
  font-size: .86rem;
  margin-top: .45rem;
}

.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
}

.pure-table {
  background: #111418;
  color: var(--text);
}

.gallery-grid,
.category-grid {
  display: grid;
  gap: 18px;
}

.gallery-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.category-grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.category-grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.category-card,
.archive-card {
  background: #14171B;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 18px;
}

.category-card.horizontal {
  display: grid;
  grid-template-columns: minmax(96px, 34%) 1fr;
  gap: 16px;
}

.category-card.minimal {
  border-width: 0 0 0 3px;
  border-left-color: var(--accent);
  background: transparent;
}

.category-card h2 {
  font-size: 1.2rem;
  line-height: 1.3;
  margin: 0 0 .5rem;
}

.toc-panel,
.sidebar-panel,
.visual-rail {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 18px;
  margin-bottom: 24px;
}

.visual-rail {
  position: sticky;
  top: 96px;
}

.visual-rail p {
  color: var(--muted);
  font-size: .82rem;
  word-break: break-word;
}

.breadcrumbs {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: .85rem;
}

.breadcrumbs li + li:before {
  content: "/";
  padding: 0 8px;
  color: var(--subtle);
}

.article-dates {
  color: var(--muted);
  font-size: .9rem;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.lead {
  color: #F8DCD7;
  border-left: 3px solid var(--warm);
  padding-left: 16px;
  font-size: 1.12rem;
}

.main-image {
  float: right;
  max-width: 33%;
  margin: 0 0 18px 24px;
}

.section-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.site-footer {
  width: min(var(--max), calc(100% - 48px));
  margin: 72px auto 40px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 28px;
}

.footer-inner {
  gap: 20px;
}

.site-footer h2,
.site-footer h3 {
  color: var(--text);
  font-family: Merriweather, Georgia, serif;
  margin-top: 0;
}

.site-footer p,
.site-footer a {
  color: var(--muted);
  font-size: .92rem;
}

.site-footer a {
  display: block;
  padding: 3px 0;
}

.site-footer a:hover {
  color: var(--warm);
  text-decoration: underline;
}

pre {
  overflow-x: auto;
  background: #090B0D;
  border: 1px solid var(--border);
  padding: 16px;
}

@media (max-width: 860px) {
  .site-main { padding-top: 128px; }
  .header-bar {
    min-height: auto;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 12px 16px;
  }
  .brand-lockup { min-width: 180px; }
  .primary-nav {
    width: 100%;
    overflow-x: auto;
  }
  .home-hero { grid-template-columns: 1fr; }
  .page-shell,
  .home-hero,
  .site-footer { width: min(100% - 28px, var(--max)); }
  .archive-list,
  .article-panel { padding: 24px; border-left-width: 6px; }
  .main-image { float: none; max-width: 100%; margin: 0 0 18px; }
  .category-card.horizontal { grid-template-columns: 1fr; }
}

@media print {
  .site-header,
  .site-footer,
  .visual-rail,
  .breadcrumbs { display: none; }
  body { background: #fff; color: #111; }
  .site-main { padding-top: 0; }
  .article-panel,
  .archive-list { border: 0; background: #fff; color: #111; }
}
