:root {
  --winter-paper: #F7F4EE;
  --ink: #1F1A17;
  --neva-blue: #2F6F8F;
  --imperial-red: #8F2D2D;
  --birch-grey: #D8D1C7;
  --gold: #C49A4A;
  --surface: #FCF9F3;
  --shadow: 0 18px 45px rgba(31, 26, 23, .08);
  --font-heading: "Playfair Display", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
}

html { background: var(--winter-paper); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--winter-paper) url("/assets/images/img_456475e77e64.png") repeat;
  font-family: var(--font-body);
  letter-spacing: 0;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--ink);
  font-family: var(--font-heading);
  letter-spacing: 0;
}

a { color: var(--neva-blue); text-decoration-color: rgba(47, 111, 143, .35); }
a:hover { color: var(--imperial-red); }
img { max-width: 100%; height: auto; }
button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  --pico-background-color: var(--neva-blue);
  --pico-border-color: var(--neva-blue);
  --pico-color: #fff;
  background-color: var(--neva-blue);
  border-color: var(--neva-blue);
  color: #fff;
}
button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
input[type="reset"]:hover {
  --pico-background-color: var(--imperial-red);
  --pico-border-color: var(--imperial-red);
  background-color: var(--imperial-red);
  border-color: var(--imperial-red);
}

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
}
.skip-link:focus { top: 16px; }

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--gold);
}

.top-nav {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--gold);
  color: var(--imperial-red);
  font-size: .95rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: .95rem;
  font-weight: 700;
}

.nav-links a { text-decoration: none; }
.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
}
.nav-parent {
  color: var(--ink);
  text-decoration: none;
}
.nav-parent:not(a) {
  cursor: default;
}
.nav-children {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: none;
  min-width: 230px;
  padding: 10px;
  border: 1px solid var(--birch-grey);
  background: var(--surface);
  box-shadow: 0 18px 40px rgba(31, 26, 23, .16);
}
.nav-item:hover .nav-children,
.nav-item:focus-within .nav-children {
  display: grid;
  gap: 6px;
}
.nav-children a {
  color: var(--ink);
  font-weight: 600;
  line-height: 1.25;
  white-space: normal;
}

.masthead {
  position: relative;
  min-height: 430px;
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}

.masthead-compact { min-height: 270px; }
.masthead img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.masthead::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(31, 26, 23, .05), rgba(31, 26, 23, .58));
  z-index: -1;
}

.masthead-copy {
  color: #fff;
  padding: 54px 0;
  text-shadow: 0 2px 16px rgba(0,0,0,.32);
}
.masthead-title {
  font-family: var(--font-heading);
  color: #fff;
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.7rem);
  font-weight: 700;
  line-height: 1.04;
}
.masthead-copy p:last-child {
  max-width: 640px;
  margin: 12px 0 0;
  font-size: 1.18rem;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--imperial-red);
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
}
.masthead .eyebrow { color: #fff; }

.breadcrumbs {
  padding-top: 26px;
  font-size: .9rem;
}
.breadcrumbs ol {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
  list-style: none;
}
.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 9px;
  color: #8b827e;
}

.page-intro {
  padding: 42px 0 22px;
}
.page-intro h1,
.home-feature h1 {
  max-width: 850px;
  font-size: clamp(2rem, 4vw, 3.5rem);
}
.page-intro p,
.dek {
  max-width: 780px;
  color: #554c46;
  font-size: 1.15rem;
  line-height: 1.65;
}

.editorial-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: 38px;
  align-items: start;
  padding: 42px 0 70px;
}

.archive-sidebar {
  position: sticky;
  top: 22px;
  display: grid;
  gap: 18px;
}

.sidebar-panel,
.article-shell,
.listing-shell,
.home-feature,
.archive-card,
.category-shell {
  background: rgba(252, 249, 243, .94);
  border: 1px solid var(--birch-grey);
  box-shadow: var(--shadow);
}

.sidebar-panel {
  padding: 20px;
}
.sidebar-panel h2 {
  margin: 0 0 12px;
  color: var(--imperial-red);
  font-size: 1.2rem;
}
.sidebar-panel ul {
  padding-left: 18px;
  margin-bottom: 0;
}
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-cloud a {
  border: 1px solid var(--birch-grey);
  padding: 4px 8px;
  background: #fff;
  font-size: .9rem;
  text-decoration: none;
}

.article-shell,
.listing-shell {
  padding: clamp(24px, 4vw, 48px);
}

.article-head {
  border-bottom: 1px solid var(--birch-grey);
  margin-bottom: 30px;
  padding-bottom: 22px;
}
.article-head h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.12;
}

.lead-image {
  margin: 0 0 30px;
  background: #fff;
  border: 1px solid var(--birch-grey);
  padding: 10px;
  text-align: center;
}
.lead-image img {
  max-height: 560px;
  object-fit: contain;
}

.article-body {
  font-size: 1.08rem;
  line-height: 1.72;
}
.article-body > * + * { margin-top: 1.15rem; }
.article-body p { margin-bottom: 0; }
.article-body h2,
.article-body h3 {
  margin-top: 2rem;
}

.content-image {
  margin: 28px auto;
  text-align: center;
}
.content-image img {
  background: #fff;
  border: 1px solid var(--birch-grey);
  padding: 8px;
  max-height: 720px;
  object-fit: contain;
}
figcaption {
  margin-top: 8px;
  color: #6b625c;
  font-size: .92rem;
  font-style: italic;
}
.image-float-left {
  float: left;
  max-width: min(44%, 360px);
  margin: 8px 24px 18px 0;
}
.image-float-right {
  float: right;
  max-width: min(44%, 360px);
  margin: 8px 0 18px 24px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  clear: both;
}
.gallery-grid figure {
  margin: 0;
  background: #fff;
  border: 1px solid var(--birch-grey);
  padding: 8px;
}

.home-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 30px;
  align-items: center;
  padding: clamp(24px, 4vw, 44px);
  margin-top: 46px;
}
.home-feature figure {
  margin: 0;
}
.home-feature img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--birch-grey);
}

.listing-blocks {
  display: grid;
  gap: 18px;
}
.article-grid,
.category-shell {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}
.listing-blocks + .article-grid {
  margin-top: 26px;
}

.archive-card {
  padding: 20px;
}
.archive-card h2,
.archive-card h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}
.archive-card p {
  color: #554c46;
}
.meta-line {
  color: #7b716a;
  font-size: .92rem;
}

.related-links,
.toc-box {
  margin-top: 34px;
  padding: 20px;
  border: 1px solid var(--birch-grey);
  background: #fff;
}
.toc-box ul {
  margin-bottom: 0;
}

.table-scroll {
  overflow-x: auto;
}

.site-footer {
  border-top: 1px solid var(--gold);
  background: var(--surface);
  padding: 38px 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.4fr;
  gap: 28px;
}
.site-footer h2,
.site-footer h3 {
  margin-top: 0;
}
.site-footer nav {
  display: grid;
  gap: 6px;
}

@media (max-width: 900px) {
  .top-nav,
  .home-feature,
  .editorial-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .top-nav {
    display: grid;
    align-items: start;
  }
  .nav-links {
    justify-content: flex-start;
  }
  .archive-sidebar {
    position: static;
    order: 2;
  }
  .article-shell,
  .listing-shell {
    padding: 22px;
  }
  .image-float-left,
  .image-float-right {
    float: none;
    max-width: 100%;
    margin: 24px auto;
  }
}

@media (max-width: 560px) {
  .wrap { width: min(100% - 24px, 1120px); }
  .masthead { min-height: 330px; }
  .masthead-compact { min-height: 230px; }
  .masthead-copy { padding: 34px 0; }
  .brand { font-size: 1.1rem; }
}

/* compact header */
.site-header .masthead { max-height: 180px; overflow: hidden; }
.site-header .masthead img { max-height: 180px; object-fit: cover; }

/* compact header v2 */
.site-header .masthead { max-height: 120px !important; min-height: 0 !important; padding: 0.6rem 0 !important; }
.site-header .masthead img { display: none !important; }
.site-header .masthead-title { font-size: 1.4rem !important; }
.site-header .masthead .eyebrow, .site-header .masthead .masthead-sub { display: none !important; }
