/* chelhistory.ru — archival heritage theme
   Palette: parchment #FFFFFF, ink #333A38, brick #2F9E5B, gold #F5821F, slate #6B7280 */

:root {
  --parchment: #FFFFFF;
  --ink: #333A38;
  --brick: #2F9E5B;
  --gold: #F5821F;
  --slate: #6B7280;
  --card-white: #FFFFFF;
}

body {
  background-color: #FFFFFF;
  color: #333A38;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.est-main { flex: 1 0 auto; }

h1, h2, h3, h4, h5, h6 {
  font-family: "Montserrat", Arial, sans-serif;
  color: #333A38;
  line-height: 1.2;
}

h1 { font-size: 2.1rem; font-weight: 700; }
h2 { font-size: 1.7rem; font-weight: 600; }
h3 { font-size: 1.4rem; font-weight: 600; }
h4 { font-size: 1.2rem; font-weight: 500; }

/* ── Announcement bar ───────────────────────────── */
.announce-bar {
  background: #2F9E5B;
  color: #fff;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 12px;
}

/* ── Masthead ───────────────────────────────────── */
.masthead {
  background: #FFFFFF;
  border-bottom: 1px solid #F5821F;
}
.masthead-inner { padding: 18px 0 12px; }
.est-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #237A45;
}
.brand-mark { height: 56px; width: auto; }
.brand-title {
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #237A45;
}

/* ── Primary nav ────────────────────────────────── */
.est-nav {
  background: #FFFFFF;
  border-bottom: 2px solid #333A38;
  box-shadow: none;
  height: auto;
  line-height: normal;
}
.est-nav .nav-wrapper { display: flex; align-items: center; }
.est-nav .est-menu {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
}
.est-nav .est-menu > li { float: none; }
.est-nav .est-menu > li > a {
  color: #333A38;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0 14px;
  line-height: 48px;
  height: 48px;
}
.est-nav .est-menu > li > a:hover {
  color: #2F9E5B;
  background: rgba(185, 138, 47, 0.12);
}
.est-nav .sidenav-trigger {
  color: #333A38;
  font-weight: 700;
  height: 48px;
  line-height: 48px;
  margin: 0;
}
.dd-arrow { font-size: 0.7em; color: #F5821F; }
.est-menu .has-dropdown { position: relative; }
.heritage-dropdown { border: 1px solid #333A38; }
.est-menu .has-dropdown > .heritage-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  height: auto;
  opacity: 1;
  visibility: visible;
  z-index: 1000;
}
.est-menu .has-dropdown:hover > .heritage-dropdown,
.est-menu .has-dropdown:focus-within > .heritage-dropdown,
.est-menu .has-dropdown.is-open > .heritage-dropdown {
  display: block;
}
.heritage-dropdown li > a { color: #333A38; font-size: 0.9rem; }
.heritage-dropdown li > a:hover { color: #2F9E5B; }

.sidenav { background: #FFFFFF; }
.sidenav li > a { color: #333A38; font-family: "Open Sans", Arial, sans-serif; }
.sidenav li > a.child-link { padding-left: 48px; font-size: 0.9rem; }

/* ── Breadcrumbs ────────────────────────────────── */
.breadcrumb-wrap {
  padding: 14px 0 0;
  font-size: 0.85rem;
}
.breadcrumb-wrap .breadcrumb {
  color: #6B7280;
  font-size: 0.85rem;
}
.breadcrumb-wrap .breadcrumb::before { color: #F5821F; }
.breadcrumb-wrap .breadcrumb:last-child { color: #2F9E5B; }
.breadcrumb-wrap a.breadcrumb:hover { text-decoration: underline; }

/* ── Page shell & content panel ─────────────────── */
.page-shell { padding: 28px 0 56px; }
.content-panel {
  background: #FFFFFF;
  border: 1px solid #333A38;
  padding: 32px 36px;
  margin-bottom: 32px;
}
.page-title { margin-top: 0; }

/* ── Prose & content links (scoped) ─────────────── */
.est-prose { font-size: 1.02rem; }
.est-prose .section-title {
  color: #237A45;
  border-bottom: 1px solid #F5821F;
  padding-bottom: 8px;
}
.est-prose a,
.est-block--paragraph a,
.est-list a,
.est-table a,
.card-excerpt a {
  color: #2F9E5B;
  text-decoration: underline;
  text-decoration-color: rgba(185, 138, 47, 0.6);
  text-underline-offset: 3px;
}
.est-prose a:hover,
.est-block--paragraph a:hover,
.est-list a:hover,
.est-table a:hover {
  color: #237A45;
  text-decoration-color: #2F9E5B;
}

.est-figure { margin: 24px 0; }
.est-figure img,
.gallery-item img,
.content-main-image {
  max-width: 100%;
  height: auto;
  border: 1px solid #F5821F;
  padding: 3px;
  background: #fff;
}
.est-figure figcaption,
.gallery-item figcaption {
  font-style: italic;
  font-size: 0.85rem;
  color: #6B7280;
  text-align: center;
  padding-top: 6px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
  margin: 24px 0;
}

.est-table { overflow-x: auto; margin: 20px 0; }
.est-table table { background: #fff; }
.est-table td, .est-table th {
  border-bottom: 1px solid rgba(185, 138, 47, 0.35);
  padding: 10px 12px;
}
.est-table img { max-width: 120px; height: auto; }

blockquote {
  border-left: 4px solid #F5821F;
  background: rgba(185, 138, 47, 0.08);
  padding: 12px 20px;
  font-style: italic;
}

hr {
  border: none;
  border-top: 1px solid #F5821F;
  margin: 28px 0;
}

/* ── Archive cards (news/listing teasers) ───────── */
.est-arch-card {
  background: #FFFFFF;
  border: 1px solid #333A38;
  border-left: 4px solid #2F9E5B;
  padding: 18px 22px;
  margin: 18px 0;
}
.est-arch-card .card-title {
  font-size: 1.25rem;
  margin: 0 0 8px;
}
.est-arch-card .card-title a {
  color: #237A45;
  text-decoration: none;
}
.est-arch-card .card-title a:hover {
  color: #2F9E5B;
  text-decoration: underline;
  text-decoration-color: rgba(185, 138, 47, 0.6);
}
.est-arch-card .card-excerpt {
  color: #333A38;
  margin: 0;
  font-size: 0.95rem;
}

/* ── Photo rail (chrome) ────────────────────────── */
.heritage-rail {
  background: #EAF7EF;
  border: 1px solid #333A38;
  padding: 18px;
}
.heritage-rail .rail-collection {
  border: none;
  margin: 0;
}
.heritage-rail .collection-item {
  background: transparent;
  border-bottom: 1px solid rgba(185, 138, 47, 0.4);
  color: #333A38;
  font-size: 0.92rem;
  line-height: 1.4;
  padding: 10px 4px;
}
.heritage-rail a.collection-item:hover { color: #2F9E5B; }

/* ── Category cards (content pipeline) ──────────── */
.category-grid { margin-top: 24px; }
.category-card {
  background: #fff;
  border: 1px solid #333A38;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.category-card .card-media img,
.category-card .card-h-media img {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 1px solid #F5821F;
}
.category-card .card-body { padding: 16px 18px; }
.category-card .card-title { font-size: 1.15rem; margin: 0 0 8px; }
.category-card .card-title a { color: #237A45; text-decoration: none; }
.category-card .card-title a:hover { color: #2F9E5B; }
.category-card .read-more {
  display: inline-block;
  margin-top: 10px;
  color: #2F9E5B;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid #F5821F;
}
.category-card .read-more:hover { color: #237A45; }
.category-card.card-style-horizontal .card-h-row { display: flex; gap: 0; }
.category-card.card-style-horizontal .card-h-media { flex: 0 0 36%; }
.category-card.card-style-horizontal .card-h-media img {
  height: 100%;
  object-fit: cover;
  border-bottom: none;
  border-right: 1px solid #F5821F;
}
.category-card.card-style-minimal {
  border: none;
  border-left: 3px solid #2F9E5B;
  background: transparent;
}

/* ── ToC panel ──────────────────────────────────── */
.toc-panel {
  background: #EAF7EF;
  border: 1px solid #F5821F;
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 0.92rem;
}
.toc-panel ul { margin: 8px 0 0; }
.toc-panel li { padding: 3px 0; }
.toc-panel a { color: #2F9E5B; }
.toc-panel a:hover { text-decoration: underline; }
.toc-sticky { position: sticky; top: 16px; }

.meta-line {
  color: #6B7280;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}
.meta-line time { margin-right: 16px; }
.lead {
  font-size: 1.12rem;
  font-style: italic;
  color: #333A38;
  border-left: 3px solid #F5821F;
  padding-left: 16px;
}
.content-main-image {
  max-width: 100%;
}
@media (min-width: 993px) {
  .content-main-image { float: right; max-width: 33%; margin: 0 0 16px 24px; }
}

/* ── Source outlinks ────────────────────────────── */
.source-outlinks { padding: 8px 0 24px; }
.source-outlinks ul { margin: 0; }
.source-outlinks li { display: inline-block; margin-right: 18px; }
.source-outlinks a { color: #2F9E5B; text-decoration: underline; font-size: 0.9rem; }

/* ── Footer ─────────────────────────────────────── */
.est-footer {
  background: #333A38;
  color: #f2dfd1;
  padding-top: 32px;
}
.est-footer .footer-brand {
  font-family: "Montserrat", Arial, sans-serif;
  color: #F5821F;
  font-size: 1.2rem;
}
.est-footer .footer-note { color: rgba(242, 223, 209, 0.7); }
.est-footer .footer-links { margin: 0; }
.est-footer .footer-links li { padding: 4px 0; }
.est-footer .footer-links a { color: #f2dfd1; }
.est-footer .footer-links a:hover { color: #F5821F; }
.est-footer .footer-copyright {
  background: rgba(0, 0, 0, 0.25);
  color: rgba(242, 223, 209, 0.6);
  font-size: 0.85rem;
}
.est-footer .footer-copyright a { color: #F5821F; }

/* ── Pagination (framework) ─────────────────────── */
.pagination li.active { background-color: #2F9E5B; }
.pagination li a { color: #333A38; }

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 992px) {
  .content-panel { padding: 20px 16px; }
  .brand-title { font-size: 1.1rem; }
  .brand-mark { height: 42px; }
  .masthead-inner { padding: 10px 0 8px; }
}

/* ── Print ──────────────────────────────────────── */
@media print {
  .est-nav, .sidenav, .heritage-rail, .est-footer, .announce-bar, .breadcrumb-wrap { display: none; }
  body { background: #fff; color: #000; }
  .content-panel { border: none; padding: 0; }
}

/* estalella theme adjustments */
.est-header { background: #2F9E5B; }
.est-header .brand-title, .est-header a { color: #FFFFFF; }
.content-panel, .est-arch-card, .category-card, .est-table td, .est-table th { border-color: #E2E8E2; }

/* Typographic scale (design/specs.md): h1 42/700 · h2 30/700 · h3 22/600 · h4 18/600 · body 16/400 · small 13/400 */
body{font-size:16px;font-weight:400}
h1{font-size:42px;font-weight:700}
h2{font-size:30px;font-weight:700}
h3{font-size:22px;font-weight:600}
h4{font-size:18px;font-weight:600}
small{font-size:13px;font-weight:400}
@media(max-width:768px){h1{font-size:32px}h2{font-size:25px}}
