/* Guide pages: loaded only by the guide pages, never by the rest of the site. */

.bmg {
  --bm-maroon: #530b0c;
  --bm-maroon-deep: #3a0607;
  --bm-ink: #2b2623;
  --bm-barn: #6b665f;
  --bm-line: #d9d5cf;
  --bm-weather: #efeeeb;
  --bm-rose: #f7eeec;
  --bm-paper: #ffffff;
  --bm-pad: 52px;
  font-family: "Source Sans 3", "Segoe UI", Verdana, sans-serif;
  font-style: normal;
  font-size: 19px;
  line-height: 1.65;
  color: var(--bm-ink);
  background: var(--bm-paper);
  padding: 34px var(--bm-pad) 44px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* ---------- frame: let the content panel grow instead of scrolling ---------- */

@media only screen and (min-width: 961px) {
  .bm-guide #main_container {
    width: auto;
    max-width: 1000px;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .bm-guide #header {
    width: auto;
    max-width: 995px;
  }
  .bm-guide #header,
  .bm-guide #toprope2,
  .bm-guide #bottom_rope,
  .bm-guide #footer {
    grid-column: 1 / -1;
  }
  .bm-guide #nav_div {
    height: auto;
    min-height: 525px;
  }
  .bm-guide #editable_div {
    width: auto;
    height: auto;
    overflow: visible;
    padding-left: 0;
    font-style: normal;
  }
  .bm-guide #footer {
    width: auto;
    margin-left: 0;
    margin-right: 0;
  }
}

.bm-guide #bottom_rope img {
  display: block;
  max-width: 100%;
  height: auto;
}

@media only screen and (max-width: 960px) {
  .bm-guide #header img {
    height: auto;
  }
  .bm-guide #footer {
    padding: 0 16px;
    background: #ffffff;
    font-size: 14px;
    line-height: 1.7;
    color: #530b0c;
  }
  .bm-guide #footer a {
    font-size: inherit;
    color: #530b0c;
  }
  .bmg {
    --bm-pad: 28px;
    max-width: 600px;
    margin: 0 auto;
    font-size: 18px;
    padding-top: 26px;
  }
}
@media only screen and (max-width: 600px) {
  .bmg {
    --bm-pad: 20px;
    font-size: 17px;
  }
}

/* site-wide mobile rule makes every link 24px; keep links at text size here */
.bmg a {
  font-size: inherit;
  color: var(--bm-maroon);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.bmg a:hover {
  color: var(--bm-maroon-deep);
  text-decoration-thickness: 2px;
}
.bmg a:focus-visible {
  outline: 2px solid var(--bm-maroon);
  outline-offset: 2px;
}

/* ---------- type ---------- */

.bmg h1,
.bmg h2 {
  font-family: "Zilla Slab", Rockwell, Georgia, serif;
  color: var(--bm-maroon);
  font-style: normal;
  margin: 0;
}
.bmg h1 {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.005em;
  max-width: 20em;
  text-wrap: balance;
}
.bmg h2 {
  font-size: 27px;
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
}
.bmg :where(p, ul, figure) {
  margin: 0;
}
.bmg__section > * + *,
.bmg__text > * + * {
  margin-top: 1em;
}
.bmg__section > h2 + *,
.bmg__text > h2 + * {
  margin-top: 0.7em;
}

@media only screen and (max-width: 600px) {
  .bmg h1 { font-size: 31px; }
  .bmg h2 { font-size: 23px; }
}

/* ---------- hero: photo to the panel edges, intro card over its lower edge ---------- */

.bmg__hero {
  margin: 26px calc(var(--bm-pad) * -1) 0;
}
.bmg__hero img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1480 / 680;
  object-fit: cover;
}
.bmg__lede {
  position: relative;
  margin: -84px 28px 0;
  padding: 24px 28px 26px;
  background: var(--bm-paper);
  border: 1px solid var(--bm-line);
  border-top: 5px solid var(--bm-maroon);
  box-shadow: 0 18px 30px -22px rgba(58, 6, 7, 0.55);
  font-size: 19px;
  font-style: italic;
  line-height: 1.6;
}
@media only screen and (max-width: 600px) {
  .bmg__hero img { aspect-ratio: 4 / 3; }
  .bmg__lede {
    margin: -40px 12px 0;
    padding: 18px 18px 20px;
    font-size: 17.5px;
  }
}

/* ---------- sections ---------- */

.bmg__section {
  margin-top: 46px;
}
.bmg__section + .bmg__section {
  padding-top: 40px;
  border-top: 1px solid var(--bm-line);
}

/* split: photo runs to the panel edge beside the text */
.bmg__split {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 34px;
  align-items: stretch;
  margin-left: calc(var(--bm-pad) * -1);
}
.bmg__split--right {
  grid-template-columns: minmax(0, 1fr) 290px;
  margin-left: 0;
  margin-right: calc(var(--bm-pad) * -1);
}
.bmg__split--right .bmg__photo { order: 2; }
.bmg__photo {
  margin: 0;
}
.bmg__photo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}
.bmg__split + * {
  margin-top: 1.4em;
}
@media only screen and (max-width: 720px) {
  .bmg__split,
  .bmg__split--right {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    margin-left: calc(var(--bm-pad) * -1);
    margin-right: calc(var(--bm-pad) * -1);
  }
  .bmg__split--right .bmg__photo { order: 0; }
  .bmg__split .bmg__text {
    padding: 0 var(--bm-pad);
  }
  .bmg__photo img {
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 10;
  }
}

/* band: wide photo across the whole panel */
.bmg__band {
  margin: 1.6em calc(var(--bm-pad) * -1);
}
.bmg__band img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1480 / 560;
  object-fit: cover;
}
@media only screen and (max-width: 600px) {
  .bmg__band img { aspect-ratio: 16 / 9; }
}

/* ---------- plates ---------- */

.bmg__plate {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 14px;
  padding: 18px 22px 18px 18px;
  border-left: 4px solid var(--bm-barn);
  background: var(--bm-weather);
}
.bmg__plate svg {
  width: 24px;
  height: 24px;
  margin-top: 3px;
  stroke: var(--bm-barn);
}
.bmg__plate--alert {
  border-left-color: var(--bm-maroon);
  background: var(--bm-rose);
}
.bmg__plate--alert svg {
  stroke: var(--bm-maroon);
}
.bmg__section > .bmg__plate {
  margin-top: 1.4em;
}

/* closing line under a card */
.bmg__aside {
  font-style: italic;
  color: var(--bm-barn);
}

/* ---------- note card (ruled index card) ---------- */

.bmg__card {
  margin-top: 1.6em;
  padding: 22px 26px 20px;
  border: 1px solid var(--bm-line);
  background: var(--bm-paper);
  box-shadow: 0 14px 26px -22px rgba(43, 38, 35, 0.6);
}
.bmg__card-title {
  font-family: "Zilla Slab", Rockwell, Georgia, serif;
  font-weight: 600;
  font-size: 21px;
  line-height: 1.3;
  color: var(--bm-maroon);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--bm-maroon);
}
.bmg__card ul {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
}
.bmg__card li {
  position: relative;
  padding: 11px 0 11px 34px;
  border-bottom: 1px solid #e4e0da;
}
.bmg__card li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 17px;
  width: 15px;
  height: 15px;
  border: 2px solid var(--bm-barn);
  border-radius: 2px;
}
.bmg__card-foot {
  margin-top: 12px;
  font-size: 16px;
  font-style: italic;
  color: var(--bm-barn);
}

/* ---------- decision table ---------- */

.bmg__table {
  width: 100%;
  margin-top: 1.1em;
  border-collapse: collapse;
  table-layout: fixed;
  border: 1px solid var(--bm-line);
  box-shadow: 0 14px 26px -22px rgba(43, 38, 35, 0.6);
}
.bmg__table col:first-child {
  width: 30%;
}
.bmg__table th {
  padding: 12px 18px;
  background: var(--bm-maroon);
  color: #ffffff;
  font-family: "Zilla Slab", Rockwell, Georgia, serif;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-align: left;
}
.bmg__table td {
  padding: 14px 18px;
  vertical-align: top;
  border-top: 1px solid var(--bm-line);
  word-break: break-word;
}
.bmg__table td:first-child {
  font-family: "Zilla Slab", Rockwell, Georgia, serif;
  font-weight: 600;
  font-size: 19px;
  line-height: 1.35;
  color: var(--bm-maroon);
  background: var(--bm-weather);
}
.bmg__table tbody tr:nth-child(3) td:first-child {
  background: var(--bm-rose);
}
@media only screen and (max-width: 520px) {
  .bmg__table th,
  .bmg__table td { padding: 11px 12px; }
  .bmg__table td:first-child { font-size: 17px; }
  .bmg__table col:first-child { width: 34%; }
}

/* ---------- closing band ---------- */

.bmg__signoff {
  margin: 52px 0 0;
  padding: 30px 34px 32px;
  background: var(--bm-maroon);
  color: #ffffff;
  font-size: 19px;
  font-style: italic;
  line-height: 1.6;
  border-bottom: 6px solid var(--bm-maroon-deep);
}
.bmg__signoff p {
  max-width: 36em;
}
@media only screen and (max-width: 600px) {
  .bmg__signoff {
    padding: 22px 22px 24px;
    font-size: 17.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bmg * { transition: none !important; }
}
