/* A short introduction opens into the full, source-linked regional history. */
.story-history-feature {
  background: var(--brand-grey-pale);
}

.berivoi-history {
  --bh-rule: var(--brand-grey-dark);
  /* The shared page already reserves 120px above fragment targets. */
  --bh-anchor-offset: 12px;
}

.berivoi-history :where([id]) {
  scroll-margin-top: var(--bh-anchor-offset);
}

.bh-overview {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  align-items: start;
  gap: clamp(36px, 5.4vw, 72px);
}

.bh-hero,
.bh-intro,
.bh-reading-body {
  min-width: 0;
}

.berivoi-history .bh-eyebrow {
  margin: 0 0 20px;
  color: var(--brand-green-dark);
  font-size: .6875rem;
  font-weight: 750;
  line-height: 1.7;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.bh-hero h2 {
  font-size: clamp(36px, 4.4vw, 58px);
  line-height: 1.18;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.bh-landscape {
  margin-top: 32px;
}

.bh-landscape img {
  width: 100%;
  aspect-ratio: 1.55;
  object-fit: cover;
  object-position: center 45%;
  border-radius: 10px;
}

.bh-landscape figcaption {
  max-width: 400px;
  margin-top: 15px;
  padding-left: 15px;
  border-left: 2px solid var(--brand-blue);
  color: var(--muted);
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.85;
}

.bh-intro > p {
  font-size: 1rem;
  line-height: 1.95;
  text-wrap: pretty;
}

.bh-intro > .bh-lead {
  color: var(--ink);
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  font-weight: 550;
  line-height: 1.75;
  letter-spacing: -.018em;
}

.bh-intro > p + p {
  margin-top: 24px;
}

.bh-reading {
  margin-top: 48px;
  border-top: 2px solid var(--brand-green);
  border-bottom: 1px solid var(--bh-rule);
}

.bh-reading > summary,
.bh-reference-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  list-style: none;
  cursor: pointer;
}

.bh-reading > summary::-webkit-details-marker,
.bh-reference-disclosure > summary::-webkit-details-marker {
  display: none;
}

.bh-reading > summary {
  min-height: 106px;
  padding: 25px 0;
  color: var(--ink);
}

.bh-read-more,
.bh-read-less {
  font-size: clamp(1.0625rem, 1.8vw, 1.375rem);
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: -.025em;
}

.bh-read-less,
.bh-reading[open] > summary .bh-read-more {
  display: none;
}

.bh-reading[open] > summary .bh-read-less {
  display: inline;
}

.bh-reading-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.8;
}

.bh-reading > summary::after,
.bh-reference-disclosure > summary::after {
  content: '+';
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--brand-green-light);
  border-radius: 50%;
  color: var(--brand-green-dark);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
}

.bh-reading[open] > summary::after,
.bh-reference-disclosure[open] > summary::after {
  content: '\2212';
}

.bh-reading[open] > summary {
  border-bottom: 1px solid var(--bh-rule);
}

.bh-reading-layout {
  display: grid;
  grid-template-columns: minmax(190px, .65fr) minmax(0, 2fr);
  align-items: start;
  gap: clamp(36px, 6vw, 80px);
  padding: 52px 0 40px;
}

.bh-contents {
  position: sticky;
  top: 132px;
  align-self: start;
  padding-right: 20px;
  border-right: 1px solid var(--bh-rule);
}

.bh-contents .bh-eyebrow {
  margin-bottom: 14px;
}

.bh-contents ol {
  margin: 0;
  padding-left: 20px;
  color: var(--brand-green-dark);
  font-size: .75rem;
  line-height: 1.65;
}

.bh-contents li {
  padding-left: 5px;
}

.bh-contents li::marker {
  font-size: .6875rem;
  font-weight: 600;
}

.bh-contents a {
  display: inline-block;
  padding: 7px 0;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
}

.bh-contents > a {
  margin-top: 14px;
  border-top: 1px solid var(--bh-rule);
  padding-top: 17px;
  font-size: .75rem;
  font-weight: 650;
}

.bh-reading-body {
  width: 100%;
  max-width: 740px;
}

.bh-context {
  padding-bottom: 38px;
  margin-bottom: 38px;
  border-bottom: 1px solid var(--bh-rule);
}

.bh-context > p {
  font-size: 1rem;
  line-height: 1.95;
}

.berivoi-history[tabindex="-1"]:focus,
.bh-section[tabindex="-1"]:focus,
.bh-sources[tabindex="-1"]:focus,
.bh-source-list > li[tabindex="-1"]:focus {
  outline: none;
}

.bh-section + .bh-section {
  margin-top: 52px;
  padding-top: 44px;
  border-top: 1px solid var(--bh-rule);
}

.bh-section h3,
.bh-sources h3 {
  max-width: 700px;
  margin-bottom: 24px;
  font-size: clamp(1.375rem, 2.4vw, 1.875rem);
  line-height: 1.4;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.bh-section > p {
  font-size: 1rem;
  line-height: 1.95;
  text-wrap: pretty;
}

.bh-section > p + p {
  margin-top: 20px;
}

.bh-section strong {
  font-weight: 650;
}

.bh-notes {
  white-space: nowrap;
}

.bh-note {
  display: inline-block;
  min-width: 23px;
  padding: 0 5px;
  color: var(--brand-green-dark);
  font-weight: 650;
  line-height: 1.6;
  text-align: center;
  text-decoration: underline;
  text-decoration-color: var(--brand-green-light);
  text-underline-offset: 3px;
  vertical-align: .35em;
}

.bh-note sup {
  font-size: .6875rem;
  vertical-align: baseline;
}

.bh-quote {
  margin: 32px 0;
  padding: 7px 0 7px 28px;
  border-left: 3px solid var(--brand-blue);
}

.bh-quote > p {
  color: var(--brand-green-dark);
  font-size: clamp(1.25rem, 2.2vw, 1.6875rem);
  font-weight: 550;
  line-height: 1.7;
  letter-spacing: -.03em;
}

.bh-quote cite,
.bh-quote footer {
  display: block;
  margin-top: 16px;
  color: var(--muted);
  font-size: .8125rem;
  font-style: normal;
  line-height: 1.8;
}

.bh-section > .bh-closing {
  margin-top: 30px;
  color: var(--brand-green-dark);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.8;
}

.bh-reference-disclosure {
  margin-top: 44px;
  border-top: 2px solid var(--brand-blue);
  border-bottom: 1px solid var(--bh-rule);
}

.bh-reference-disclosure > summary {
  min-height: 82px;
  padding: 22px 0;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.7;
}

.bh-reference-disclosure > summary small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 400;
}

.bh-reference-count {
  margin-left: auto;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 400;
  white-space: nowrap;
}

.bh-reference-disclosure > summary::after {
  flex-basis: 32px;
  width: 32px;
  height: 32px;
  font-size: 21px;
}

.bh-sources {
  padding: 20px 0 32px;
}

.bh-sources > p:not(.bh-eyebrow) {
  font-size: .875rem;
  line-height: 1.85;
}

.bh-source-list {
  margin: 30px 0 0;
  padding-left: 28px;
}

.bh-source-list > li {
  padding: 22px 0 24px 9px;
  border-top: 1px solid var(--bh-rule);
  font-size: .8125rem;
  line-height: 1.8;
}

.bh-source-list > li::marker {
  color: var(--brand-green-dark);
  font-size: .8125rem;
  font-weight: 700;
}

.bh-source-list p + p {
  margin-top: 10px;
}

.bh-source-title {
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.75;
}

.bh-source-title a,
.bh-source-url a {
  text-decoration: underline;
  text-decoration-color: var(--brand-blue);
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}

.bh-source-meta,
.bh-source-url,
.bh-return {
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.85;
}

.bh-source-meta span {
  font-size: .6875rem;
}

.bh-source-url {
  overflow-wrap: anywhere;
}

.bh-backref {
  display: inline-grid;
  min-width: 30px;
  min-height: 30px;
  place-items: center;
  border-radius: 4px;
  background: var(--brand-grey);
  color: var(--brand-green-dark);
  font-size: 1rem;
  vertical-align: middle;
}

.bh-close-reading {
  min-height: 44px;
  margin-top: 28px;
  padding: 10px 0;
  border: 0;
  border-bottom: 2px solid var(--brand-blue);
  background: transparent;
  color: var(--ink);
  font-size: .8125rem;
  font-weight: 650;
  line-height: 1.75;
  text-align: left;
}

.berivoi-history :where(a, summary, button):focus-visible {
  outline: 3px solid var(--brand-blue-dark);
  outline-offset: 5px;
  border-radius: 3px;
}

.bh-section:target > h3,
.bh-sources:target > h3 {
  text-decoration: underline;
  text-decoration-color: var(--brand-blue);
  text-underline-offset: 9px;
  text-decoration-thickness: 2px;
}

.bh-note:target,
.bh-source-list > li:target {
  background: var(--brand-grey);
  box-shadow: 0 0 0 8px var(--brand-grey);
}

.bh-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 (hover: hover) {
  .bh-reading > summary:hover .bh-read-more,
  .bh-reading > summary:hover .bh-read-less,
  .bh-reference-disclosure > summary:hover,
  .bh-close-reading:hover {
    color: var(--brand-green-dark);
  }
  .bh-reading > summary:hover::after,
  .bh-reference-disclosure > summary:hover::after,
  .bh-backref:hover {
    background: var(--brand-green-pale);
  }
  .bh-contents a:hover {
    text-decoration-color: var(--brand-blue-dark);
  }
  .bh-note:hover {
    background: var(--brand-green-pale);
  }
}

@media (max-width: 1000px) {
  .bh-overview {
    grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
    gap: 36px;
  }
  .bh-reading-layout {
    grid-template-columns: minmax(150px, .6fr) minmax(0, 2fr);
    gap: 32px;
  }
  .bh-contents {
    padding-right: 16px;
  }
}

@media (max-width: 760px) {
  .berivoi-history {
    --bh-anchor-offset: 10px;
  }
  .bh-overview,
  .bh-reading-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .bh-overview {
    gap: 30px;
  }
  .bh-hero h2 {
    font-size: clamp(36px, 7vw, 48px);
  }
  .bh-landscape {
    margin-top: 26px;
  }
  .bh-landscape img {
    aspect-ratio: 1.8;
  }
  .bh-landscape figcaption {
    max-width: none;
  }
  .bh-intro > .bh-lead {
    font-size: 1.125rem;
  }
  .bh-reading {
    margin-top: 34px;
  }
  .bh-reading > summary {
    gap: 18px;
  }
  .bh-reading-layout {
    gap: 32px;
    padding-top: 28px;
    padding-bottom: 30px;
  }
  .bh-contents {
    position: static;
    padding: 0 0 24px;
    border-right: 0;
    border-bottom: 1px solid var(--bh-rule);
  }
  .bh-contents ol {
    columns: 2;
    column-gap: 28px;
  }
  .bh-contents li {
    break-inside: avoid;
  }
  .bh-contents > a {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 0;
  }
  .bh-section + .bh-section {
    margin-top: 36px;
    padding-top: 32px;
  }
  .bh-section h3 {
    margin-bottom: 20px;
  }
  .bh-section > p {
    line-height: 1.9;
  }
  .bh-quote {
    padding-left: 20px;
  }
}

@media (max-width: 420px) {
  .bh-hero h2 {
    font-size: 36px;
  }
  .bh-reading > summary::after {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
  }
  .bh-contents ol {
    columns: 1;
  }
  .bh-reading-hint {
    font-size: .75rem;
  }
  .bh-note {
    min-width: 21px;
    padding-inline: 4px;
  }
  .bh-source-list {
    padding-left: 24px;
  }
  .bh-source-list > li {
    padding-left: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .berivoi-history *,
  .berivoi-history *::before,
  .berivoi-history *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .story-history-feature {
    background: transparent;
  }
  .bh-overview,
  .bh-reading-layout {
    display: block;
  }
  .bh-landscape {
    max-width: 420px;
    margin-bottom: 28px;
  }
  .bh-contents,
  .bh-reading > summary,
  .bh-reference-disclosure > summary,
  .bh-close-reading,
  .bh-return {
    display: none !important;
  }
  .bh-reading > :not(summary),
  .bh-reference-disclosure > :not(summary) {
    display: block !important;
  }
  .bh-reading::details-content,
  .bh-reference-disclosure::details-content {
    content-visibility: visible;
  }
  .bh-reading-body {
    max-width: none;
  }
  .bh-section h3,
  .bh-sources h3 {
    break-after: avoid;
  }
  .bh-quote,
  .bh-source-list > li {
    break-inside: avoid;
  }
}
