.tmtb-mag {
  --ink: #172b23;
  --forest: #123328;
  --paper: #f5f0e5;
  --gold: #f4cc8b;
  --rule: #a7afa1;
  --serif: Georgia, "Times New Roman", serif;
  color: var(--ink);
  font: 1rem/1.65 system-ui, sans-serif;
  max-width: 1280px;
  margin: 0 auto;
}
.tmtb-mag *, .tmtb-mag *::before, .tmtb-mag *::after { box-sizing: border-box; }
.tmtb-mag h2, .tmtb-mag h3 {
  font-family: var(--serif);
  color: inherit;
  letter-spacing: -.045em;
  line-height: 1.02;
  margin: 0 0 .45em;
  text-transform: none;
}
.tmtb-mag h2 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
.tmtb-mag h3 { font-size: clamp(1.5rem, 2.5vw, 2.2rem); }
.tmtb-mag p { margin: 0 0 1rem; }
.tmtb-mag a { color: inherit; text-underline-offset: .22em; }
.tmtb-mag a:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
.tmtb-masthead {
  border-block: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem 1.4rem;
  padding: .75rem 0;
  margin-bottom: 1rem;
}
.tmtb-masthead nav { display: flex; flex-wrap: wrap; gap: .55rem 1.4rem; font-size: .86rem; font-weight: 650; }
.tmtb-cover {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  background: var(--forest);
  color: #fff9eb;
}
.tmtb-cover-copy { padding: clamp(1.5rem, 4.4vw, 4.5rem); align-self: center; }
.tmtb-cover h1 { font-size: clamp(2.6rem, 5.4vw, 5.55rem); }
.tmtb-cover h1 em { color: var(--gold); display: block; font-weight: inherit; }
.tmtb-cover-copy > p:not(.tmtb-kicker) { max-width: 36ch; color: #eee8dc; }
.tmtb-mag .tmtb-kicker { font-size: .74rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.tmtb-cover .tmtb-kicker, .tmtb-contribute .tmtb-kicker { color: var(--gold); }
.tmtb-cover-photo { position: relative; min-height: 23rem; margin: 0; }
.tmtb-cover-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.tmtb-cover-photo figcaption {
  position: absolute;
  bottom: .8rem;
  right: .8rem;
  background: #123328;
  color: #fff9eb;
  font-size: .72rem;
  padding: .3rem .65rem;
}
.tmtb-mag a.tmtb-button {
  display: inline-block;
  background: var(--gold);
  color: var(--ink);
  padding: .75rem 1rem;
  margin-top: .45rem;
  text-decoration: none;
  font-weight: 750;
}
.tmtb-button span { margin-inline-start: .5em; }
.tmtb-mag a.tmtb-button:hover { background: #ffe2ae; text-decoration: underline; }
.tmtb-section { padding: clamp(2.5rem, 6vw, 5rem) 0; }
.tmtb-section, .tmtb-contribute { scroll-margin-top: 6rem; }
.tmtb-section > h2 { border-bottom: 2px solid var(--ink); padding-bottom: .35em; }
.tmtb-lead { background: var(--paper); margin: 1.5rem 0; }
.tmtb-lead-with-image { display: grid; grid-template-columns: 1.1fr 1fr; }
.tmtb-lead-copy { padding: clamp(1.5rem, 4vw, 3.25rem); align-self: center; }
.tmtb-lead h3 { font-size: clamp(2rem, 3.7vw, 3.5rem); }
.tmtb-lead-image { position: relative; min-height: 16rem; }
.tmtb-lead-image img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.tmtb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.65rem; }
.tmtb-card { border-bottom: 1px solid var(--rule); min-width: 0; }
.tmtb-card-copy { padding: 1rem 0 .55rem; }
.tmtb-card-image img { display: block; width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.tmtb-mag .tmtb-byline { font-size: .82rem; color: #465a50; }
.tmtb-mag h3 a { text-decoration: none; overflow-wrap: anywhere; }
.tmtb-mag h3 a:hover { text-decoration: underline; }
.tmtb-archive { display: inline-block; margin-top: .4rem; font-weight: 750; }
.tmtb-grid + .tmtb-archive { margin-top: 1.5rem; }
.tmtb-mag .tmtb-empty { padding: 1.5rem; background: var(--paper); margin: 0; }
.tmtb-contribute {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  background: var(--forest);
  color: #fff9eb;
  padding: clamp(1.5rem, 5vw, 4rem);
  border-top: .35rem solid var(--gold);
}
.tmtb-contribute > div { flex: 1 1 24rem; }
.tmtb-contribute h2 { max-width: 18ch; }
.tmtb-contribute p { max-width: 62ch; }
.tmtb-contribute p:last-child { margin-bottom: 0; }
@media (max-width: 800px) {
  .tmtb-cover, .tmtb-lead-with-image { grid-template-columns: 1fr; }
  .tmtb-cover-photo { min-height: 0; aspect-ratio: 16/10; }
  .tmtb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 550px) {
  .tmtb-grid { grid-template-columns: 1fr; }
}


.tmtb-mag .tmtb-cover-copy { min-width: 0; padding: clamp(1.35rem, 3vw, 2.75rem); }
.tmtb-mag .tmtb-cover h1 {
  font-size: clamp(1.9rem, 3.35vw, 3.65rem);
  line-height: 1.06;
}
.tmtb-mag .tmtb-cover h1,
.tmtb-mag .tmtb-cover h1 em {
  overflow-wrap: normal;
  word-wrap: normal;
  word-break: normal;
  hyphens: none;
}

/* Match the coral and charcoal used by the TakeMeToBanff theme. */
.tmtb-mag {
  --ink: #303030;
  --paper: #fff5f0;
  --rule: #e9e2de;
  --coral: #ff8057;
  --coral-text: #9b381f;
  --serif: Georgia, "Times New Roman", serif;
}
.tmtb-mag h2, .tmtb-mag h3 { letter-spacing: -.025em; }
.tmtb-masthead { border-top: 0; padding: .65rem 0 .85rem; }
.tmtb-masthead nav a:last-child { color: var(--coral-text); }
.tmtb-cover {
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
}
.tmtb-mag .tmtb-cover-copy { padding: clamp(1.4rem, 3.1vw, 3rem); }
.tmtb-mag .tmtb-cover h1 { font-size: clamp(2rem, 3.2vw, 3.5rem); }
.tmtb-cover h1 em, .tmtb-cover .tmtb-kicker, .tmtb-contribute .tmtb-kicker { color: var(--coral-text); }
.tmtb-cover-copy > p:not(.tmtb-kicker) { color: #4b4541; }
.tmtb-cover-photo { min-height: 21rem; }
.tmtb-cover-photo figcaption { background: #282828; color: #fff; border-radius: 4px; }
.tmtb-mag a.tmtb-button { background: var(--coral); color: #221610; border-radius: 6px; }
.tmtb-mag a.tmtb-button:hover { background: #ff9a79; }
.tmtb-section { padding: clamp(2rem, 4vw, 3.5rem) 0; }
.tmtb-section > h2 { font-size: clamp(1.85rem, 3vw, 3rem); border-bottom: 1px solid var(--rule); padding-bottom: .6em; }
.tmtb-lead { border-radius: 10px; overflow: hidden; }
.tmtb-card-image img { border-radius: 8px; }
.tmtb-mag .tmtb-byline { color: #625752; }
.tmtb-mag .tmtb-empty { border-left: 3px solid var(--coral); border-radius: 4px; }
.tmtb-empty a { color: var(--coral-text); text-decoration: underline; }
.tmtb-contribute { background: var(--paper); color: var(--ink); border-top: 3px solid var(--coral); border-radius: 8px; }
.tmtb-contribute h2 { font-size: clamp(1.8rem, 3vw, 3rem); }
@media (max-width: 800px) {
  .tmtb-cover-photo { min-height: 0; }
}

/* Break out of the theme's centered content container. */
.tmtb-mag {
  position: relative;
  left: 50%;
  width: 100vw;
  max-width: none;
  margin: 0;
  transform: translateX(-50%);
  box-sizing: border-box;
  padding-inline: clamp(12px, 2vw, 32px);
  background: #fff;
}
body.tmtb-magazine-page {
  overflow-x: clip;
}

/* The magazine supplies its own page heading and contribution links. */
.tmtb-magazine-page h1:not(.tmtb-cover h1),
.tmtb-magazine-page .sharedaddy,
.tmtb-magazine-page .jetpack-likes-widget-wrapper {
  display: none;
}
.tmtb-magazine-page .tmtb-mag {
  --header-clearance: 105px;
  padding-top: calc(var(--header-clearance) + 12px);
  background: linear-gradient(#212121 0 var(--header-clearance), #fff var(--header-clearance));
}
.tmtb-mag .tmtb-cover h1 {
  font-family: var(--serif);
  color: inherit;
  letter-spacing: -.025em;
  margin: 0 0 .45em;
  text-transform: none;
}
@media (max-width: 800px) {
  .tmtb-magazine-page .tmtb-mag { --header-clearance: 80px; }
}

/* Let the full-width magazine and footer meet on a clean white canvas. */
body.tmtb-magazine-page { background: #fff; }
.tmtb-magazine-page :is(main, article, .hentry, .entry-content, .content):has(.tmtb-mag) {
  background: #fff;
  box-shadow: none;
}
.tmtb-magazine-page .tmtb-mag::before {
  content: "";
  position: absolute;
  inset: -28px 0 auto;
  height: 28px;
  background: #212121;
  pointer-events: none;
}
.tmtb-magazine-page .tmtb-mag { padding-bottom: clamp(16px, 2vw, 32px); }
