:root {
  --bj-paper: #F6F1E7;
  --bj-paper-soft: #FBF8F1;
  --bj-panel: #FFFDFC;
  --bj-ink: #1F2A30;
  --bj-muted: #5D6468;
  --bj-accent: #9A1D2E;
  --bj-accent-deep: #721523;
  --bj-gold: #C79A4B;
  --bj-gold-soft: rgba(199, 154, 75, 0.18);
  --bj-line: #D8D2C6;
  --bj-night: #12181C;
  --bj-shadow: 0 24px 52px rgba(31, 42, 48, 0.12);
  --bj-shadow-soft: 0 18px 36px rgba(31, 42, 48, 0.08);
  --bj-radius-xl: 30px;
  --bj-radius-lg: 22px;
  --bj-radius-md: 16px;
  --bj-radius-sm: 10px;
  --bj-max: 1380px;
  --bj-gutter: 32px;
  --bj-section-gap: 56px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--bj-ink);
  background:
    linear-gradient(180deg, rgba(199, 154, 75, 0.08) 0%, rgba(246, 241, 231, 0.92) 18%, rgba(246, 241, 231, 1) 100%),
    radial-gradient(circle at top right, rgba(154, 29, 46, 0.08), transparent 28%);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

p,
ul,
ol,
table,
blockquote,
pre {
  margin: 0 0 1.15rem;
}

ul,
ol {
  padding-left: 1.2rem;
}

.site-main {
  padding-bottom: 4rem;
}

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

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

.section-spacing {
  padding-top: 2.5rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
}

.utility-strip {
  background: linear-gradient(90deg, var(--bj-accent-deep), var(--bj-accent));
  color: rgba(255, 250, 245, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.utility-strip__inner {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.utility-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.utility-links a {
  position: relative;
  padding: 0.65rem 0;
}

.utility-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.45rem;
  height: 1px;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--bj-gold);
  transition: transform 160ms ease;
}

.utility-links a:hover::after,
.utility-links a:focus-visible::after {
  transform: scaleX(1);
}

.utility-meta {
  color: rgba(255, 250, 245, 0.78);
}

.masthead {
  margin-top: 1rem;
  padding: 1.35rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.94)),
    linear-gradient(135deg, rgba(199, 154, 75, 0.16), transparent 55%);
  border: 1px solid rgba(199, 154, 75, 0.32);
  border-radius: var(--bj-radius-xl);
  box-shadow: var(--bj-shadow-soft);
}

.masthead__brand {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-width: 0;
}

.masthead__marks {
  display: flex;
  gap: 0.85rem;
  flex-shrink: 0;
}

.masthead__marks img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  padding: 0.4rem;
  box-shadow: inset 0 0 0 1px rgba(199, 154, 75, 0.2);
}

.masthead__copy {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.masthead__title,
.page-banner__title,
.content-heading,
.category-card h2,
.mini-listing h3,
.info-card__title,
.footer-brand__title {
  font-family: "Source Serif 4", Georgia, serif;
  letter-spacing: -0.03em;
}

.masthead__title {
  font-size: clamp(1.4rem, 2.2vw, 2.55rem);
  line-height: 1.1;
  color: var(--bj-accent);
  font-weight: 700;
  text-transform: uppercase;
}

.masthead__subtitle {
  font-size: 0.78rem;
  line-height: 1.5;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bj-muted);
}

.masthead__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.masthead__pill {
  padding: 0.8rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(154, 29, 46, 0.18);
  color: var(--bj-accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.masthead__pill--accent {
  background: var(--bj-accent);
  color: #fff7f3;
}

.primary-nav {
  margin-top: 1rem;
}

.primary-nav__inner {
  background: rgba(18, 24, 28, 0.92);
  color: #f8f3ea;
  border-radius: var(--bj-radius-lg);
  padding: 0 1.2rem;
  box-shadow: var(--bj-shadow-soft);
}

.primary-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.2rem;
  align-items: stretch;
}

.primary-menu > li {
  position: relative;
}

.primary-menu > li > a {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 0 1rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.primary-menu > li > a:hover,
.primary-menu > li > a:focus-visible {
  color: var(--bj-gold);
}

.primary-menu > li.has-children > a::after {
  content: "▾";
  margin-left: 0.45rem;
  font-size: 0.75rem;
  color: rgba(248, 243, 234, 0.68);
}

.submenu {
  position: absolute;
  left: 0;
  top: calc(100% - 0.15rem);
  z-index: 20;
  min-width: 280px;
  list-style: none;
  margin: 0;
  padding: 0.8rem 0;
  background: var(--bj-panel);
  color: var(--bj-ink);
  border: 1px solid rgba(199, 154, 75, 0.35);
  border-radius: 0 0 var(--bj-radius-md) var(--bj-radius-md);
  box-shadow: var(--bj-shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.primary-menu > li:hover .submenu,
.primary-menu > li:focus-within .submenu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.submenu li a {
  display: block;
  padding: 0.7rem 1rem;
  font-size: 0.92rem;
  color: var(--bj-ink);
}

.submenu li a:hover,
.submenu li a:focus-visible {
  background: rgba(199, 154, 75, 0.12);
  color: var(--bj-accent);
}

.mobile-nav {
  display: none;
  padding: 0.9rem 0;
}

.mobile-nav summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: #fff7f3;
}

.mobile-nav summary::-webkit-details-marker {
  display: none;
}

.mobile-nav__panel {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.8rem;
}

.mobile-nav__item > a,
.mobile-nav__children a {
  display: block;
  padding: 0.65rem 0;
}

.mobile-nav__children {
  padding-left: 1rem;
}

.breadcrumbs-wrap {
  padding-top: 1.15rem;
}

.breadcrumbs {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.86rem;
  color: var(--bj-muted);
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.breadcrumbs li + li::before {
  content: "/";
  color: rgba(93, 100, 104, 0.5);
}

.breadcrumbs a:hover,
.breadcrumbs a:focus-visible {
  color: var(--bj-accent);
}

.home-grid,
.page-banner,
.page-panel,
.directory-card,
.info-card,
.portrait-card,
.category-card {
  box-shadow: var(--bj-shadow-soft);
}

.page-banner {
  margin-top: 1.25rem;
}

.page-banner__inner {
  padding: 32px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 252, 247, 0.88)),
    radial-gradient(circle at top right, rgba(199, 154, 75, 0.12), transparent 36%);
  border: 1px solid rgba(199, 154, 75, 0.28);
  border-radius: var(--bj-radius-xl);
}

.page-banner__meta {
  margin-bottom: 0.65rem;
  color: var(--bj-accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-banner__title {
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 3.55rem);
  line-height: 1;
}

.page-banner__subtitle {
  margin-top: 1rem;
  max-width: 52rem;
  color: var(--bj-muted);
}

.hero-panel {
  padding: 32px;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.96), rgba(255, 252, 247, 0.88)),
    radial-gradient(circle at right top, rgba(154, 29, 46, 0.08), transparent 34%);
  border-radius: var(--bj-radius-xl);
  border: 1px solid rgba(199, 154, 75, 0.28);
}

.hero-story {
  display: block;
  margin-top: 1.5rem;
  border-radius: var(--bj-radius-lg);
  overflow: hidden;
  background: var(--bj-night);
  color: #f8f2ea;
}

.hero-story__body {
  padding: 24px;
}

.hero-story__figure {
  margin: 0;
  border-radius: var(--bj-radius-lg);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(18, 24, 28, 0.9), rgba(18, 24, 28, 0.74));
}

.hero-story__figure img {
  width: 100%;
  min-height: 260px;
  object-fit: cover;
}

.story-chip,
.news-card__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--bj-gold);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}

.story-chip::before,
.news-card__meta::before {
  content: "";
  width: 2.2rem;
  height: 1px;
  background: currentColor;
}

.news-card-grid {
  margin-top: 1.5rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.news-card-grid--listing {
  margin-top: 0;
  grid-template-columns: 1fr;
}

.link-matrix {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.link-matrix a {
  display: block;
  min-height: 100%;
  padding: 0.9rem 1rem;
  border-radius: var(--bj-radius-md);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(216, 210, 198, 0.92);
  color: var(--bj-ink);
  font-size: 0.94rem;
  line-height: 1.45;
}

.link-matrix a:hover,
.link-matrix a:focus-visible {
  border-color: rgba(199, 154, 75, 0.62);
  color: var(--bj-accent);
}

.news-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 170px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(216, 210, 198, 0.9);
  border-radius: var(--bj-radius-lg);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.news-card:hover,
.news-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(199, 154, 75, 0.56);
  box-shadow: var(--bj-shadow);
}

.news-card__title {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.25rem;
  line-height: 1.25;
}

.page-panel {
  padding: 32px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(216, 210, 198, 0.9);
  border-radius: var(--bj-radius-xl);
}

.page-panel--reading {
  padding: 40px;
}

.content-flow > * + * {
  margin-top: 1.1rem;
}

.content-paragraph,
.content-fallback,
.table-fallback {
  color: var(--bj-ink);
}

.content-heading {
  margin: 2rem 0 0.85rem;
  font-size: clamp(1.35rem, 2.1vw, 2rem);
  line-height: 1.15;
}

.content-list li + li {
  margin-top: 0.5rem;
}

.content-list a {
  color: var(--bj-accent);
}

.content-list a:hover,
.content-list a:focus-visible {
  text-decoration: underline;
}

.content-blockquote {
  margin: 1.5rem 0;
  padding: 1.1rem 1.25rem;
  border-left: 4px solid var(--bj-gold);
  background: rgba(199, 154, 75, 0.12);
  color: var(--bj-accent-deep);
}

.content-code {
  padding: 1rem 1.15rem;
  border-radius: var(--bj-radius-md);
  background: var(--bj-night);
  color: #fff7f3;
  overflow-x: auto;
}

.content-separator {
  border: 0;
  border-top: 1px solid rgba(199, 154, 75, 0.36);
  margin: 2rem 0;
}

.table-card,
.table-fallback-stack {
  overflow: hidden;
  border: 1px solid rgba(216, 210, 198, 0.92);
  border-radius: var(--bj-radius-lg);
  background: #fffdfa;
}

.table-fallback {
  padding: 1rem 1.15rem;
}

.table-fallback + .table-fallback {
  border-top: 1px solid rgba(216, 210, 198, 0.92);
}

.civic-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
}

.civic-table thead th {
  background: rgba(154, 29, 46, 0.08);
  color: var(--bj-accent-deep);
  font-weight: 700;
}

.civic-table th,
.civic-table td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid rgba(216, 210, 198, 0.9);
  vertical-align: top;
}

.civic-table tr:last-child td {
  border-bottom: 0;
}

.content-image {
  width: 100%;
  border-radius: var(--bj-radius-lg);
  object-fit: cover;
}

.content-image--inline {
  width: auto;
  max-width: 160px;
  border-radius: 12px;
}

.image-figure {
  margin: 0;
}

.image-figure figcaption {
  margin-top: 0.65rem;
  color: var(--bj-muted);
  font-size: 0.9rem;
}

.image-figure--lead {
  margin-bottom: 1.5rem;
}

.image-figure--gallery img {
  min-height: 220px;
}

.gallery-grid {
  margin-top: 0.5rem;
}

.mini-listing {
  padding: 1.1rem 1.15rem;
  border-radius: var(--bj-radius-md);
  border: 1px solid rgba(216, 210, 198, 0.92);
  background: rgba(255, 252, 248, 0.92);
}

.mini-listing h3 {
  margin: 0 0 0.65rem;
  font-size: 1.2rem;
}

.rail-stack {
  display: grid;
  gap: 1rem;
}

.info-card {
  padding: 24px;
  border-radius: var(--bj-radius-lg);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(216, 210, 198, 0.92);
}

.info-card--accent {
  background: linear-gradient(180deg, rgba(154, 29, 46, 0.96), rgba(114, 21, 35, 0.94));
  color: #fff8f2;
}

.info-card__title {
  margin: 0 0 0.75rem;
  font-size: 1.45rem;
  line-height: 1.1;
}

.info-card__body {
  color: inherit;
  font-size: 0.97rem;
}

.portrait-card {
  padding: 0;
  overflow: hidden;
  border-radius: var(--bj-radius-lg);
  border: 1px solid rgba(216, 210, 198, 0.92);
  background: var(--bj-panel);
}

.portrait-card img {
  width: 100%;
  min-height: 220px;
  object-fit: cover;
}

.portrait-card--narrow img {
  min-height: 280px;
}

.resource-gallery {
  display: grid;
  gap: 1rem;
}

.resource-gallery img {
  width: 100%;
  padding: 1rem;
  background: rgba(18, 24, 28, 0.92);
  border-radius: var(--bj-radius-lg);
}

.sidebar-stack {
  position: sticky;
  top: 10.75rem;
}

.directory-card {
  padding: 20px;
  border-radius: var(--bj-radius-xl);
  background: rgba(250, 246, 238, 0.96);
  border: 1px solid rgba(216, 210, 198, 0.92);
}

.directory-item {
  border-bottom: 1px solid rgba(216, 210, 198, 0.8);
}

.directory-item:last-child {
  border-bottom: 0;
}

.directory-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.1rem;
  line-height: 1.25;
}

.directory-item summary::-webkit-details-marker {
  display: none;
}

.directory-item__body {
  padding: 0 0 1rem;
  display: grid;
  gap: 0.6rem;
}

.directory-link {
  display: block;
  color: var(--bj-muted);
  font-size: 0.92rem;
}

.directory-link:hover,
.directory-link:focus-visible,
.directory-link--lead {
  color: var(--bj-accent);
}

.article-header h1 {
  margin: 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1.05;
}

.article-meta-row {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  color: var(--bj-muted);
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-summary {
  margin-top: 1.15rem;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--bj-gold);
  background: rgba(199, 154, 75, 0.12);
}

.toc-card {
  padding: 24px;
  border-radius: var(--bj-radius-lg);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(216, 210, 198, 0.92);
}

.toc-card ul {
  margin: 0;
  padding-left: 1rem;
}

.toc-card li + li {
  margin-top: 0.55rem;
}

.toc-card a {
  color: var(--bj-accent);
}

.sticky-panel {
  position: sticky;
  top: 10.75rem;
}

.category-card {
  height: 100%;
  overflow: hidden;
  border-radius: var(--bj-radius-lg);
  border: 1px solid rgba(216, 210, 198, 0.92);
  background: rgba(255, 255, 255, 0.92);
}

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

.category-card__body,
.category-card--minimal {
  padding: 24px;
}

.category-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.45rem;
  line-height: 1.15;
}

.category-card p {
  color: var(--bj-muted);
}

.category-card--horizontal {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
}

.category-card--horizontal .category-card__media img {
  height: 100%;
  aspect-ratio: auto;
}

.category-card--horizontal .category-card__body {
  padding: 24px;
}

.category-card--minimal {
  border-left: 4px solid var(--bj-accent);
}

.read-more-link {
  display: inline-flex;
  align-items: center;
  margin-top: 1rem;
  color: var(--bj-accent);
  font-weight: 700;
}

.read-more-link:hover,
.read-more-link:focus-visible {
  color: var(--bj-accent-deep);
}

.site-footer {
  margin-top: var(--bj-section-gap);
  padding: 32px 0;
  background: var(--bj-night);
  color: #efe8dd;
  border-top: 4px solid var(--bj-accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.footer-brand__title {
  display: block;
  font-size: 1.5rem;
  line-height: 1.1;
}

.footer-brand__domain {
  margin-top: 0.85rem;
  color: rgba(239, 232, 221, 0.66);
}

.footer-links {
  display: grid;
  gap: 0.7rem;
}

.footer-links a {
  color: rgba(239, 232, 221, 0.82);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--bj-gold);
}

@media (max-width: 1023px) {
  .masthead {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-menu {
    display: none;
  }

  .mobile-nav {
    display: block;
  }

  .sidebar-stack {
    position: static;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 781px) {
  body {
    font-size: 16px;
  }

  .utility-strip__inner,
  .masthead,
  .page-banner__inner,
  .hero-panel,
  .page-panel,
  .directory-card,
  .info-card,
  .toc-card,
  .category-card__body,
  .category-card--minimal {
    padding-left: 24px;
    padding-right: 24px;
  }

  .masthead__brand {
    flex-direction: column;
    align-items: flex-start;
  }

  .masthead__actions {
    justify-content: flex-start;
  }

  .news-card-grid {
    grid-template-columns: 1fr;
  }

  .category-card--horizontal {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 639px) {
  .utility-strip__inner {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
  }

  .masthead__marks img {
    width: 52px;
    height: 52px;
  }

  .page-shell {
    width: min(calc(100% - 1rem), var(--bj-max));
  }

  .page-banner__title,
  .article-header h1 {
    font-size: 2rem;
  }

  .hero-story__figure img,
  .portrait-card img {
    min-height: 180px;
  }
}

@media print {
  .utility-strip,
  .primary-nav,
  .sidebar-stack,
  .site-footer,
  .rail-stack,
  .toc-card {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .page-banner__inner,
  .page-panel {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}
