:root { --em-bar-h: calc(64px + env(safe-area-inset-top, 0px)); }

.em-skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 500;
  background: #efeae1;
  color: #1c1915;
  padding: 8px 12px;
  font: 500 14px/1 "IBM Plex Mono", ui-monospace, monospace;
}
.em-skip:focus { top: 8px; }

.em-bar,
.em-foot,
.em-bar *,
.em-foot * { box-sizing: border-box; }

.em-bar {
  position: sticky;
  top: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 22px;
  height: var(--em-bar-h);
  padding: env(safe-area-inset-top, 0px) max(20px, calc((100% - 1120px) / 2)) 0;
  background: #efeae1;
  color: #1c1915;
  border-bottom: 1px solid #1c1915;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.em-bar .em-brand,
.em-foot .em-brand {
  flex: none;
  display: flex;
  align-items: center;
  text-decoration: none !important;
  line-height: 1 !important;
}
.em-mark {
  display: block !important;
  width: 44px !important;
  height: 44px !important;
  max-width: none !important;
}
.em-foot .em-mark {
  width: 36px !important;
  height: 36px !important;
}
.em-word {
  display: block;
  margin-left: 10px;
  color: #1c1915;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.25rem;
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1;
  text-transform: none;
}

body.em-home { background: #141311; }
body.em-home .em-bar {
  background: #101418;
  color: #f4efe6;
  border-bottom: 1px solid rgba(244, 239, 230, 0.16);
}
body.em-home .em-word { color: #f4efe6; }
body.em-home .em-bar nav a { color: #f4efe6 !important; }
body.em-home .em-bar nav a.is-on,
body.em-home .em-bar nav a:hover { color: #d7c48a !important; }
body.em-home .em-foot {
  background: #0e1114;
  color: #f4efe6;
  border-top: 1px solid rgba(244, 239, 230, 0.16);
}
body.em-home .em-foot .em-mark {
  width: 36px !important;
  height: 36px !important;
}
body.em-home .em-foot nav a { color: #f4efe6 !important; }
body.em-home .em-foot nav a:hover { color: #d7c48a !important; }
body.em-home .em-tag,
body.em-home .em-copy { color: #b7aea2 !important; }
body.em-home .em-top {
  background: #f4efe6;
  color: #0e1114;
  border-color: #f4efe6;
}
body.em-home .em-top:hover { background: #7d9a62; border-color: #7d9a62; color: #0e1114; }

.em-bar nav {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.em-bar nav::-webkit-scrollbar { display: none; }

.em-bar nav a,
.em-foot nav a {
  color: #1c1915 !important;
  text-decoration: none !important;
  font: 500 11px/1 "IBM Plex Mono", ui-monospace, monospace !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  white-space: nowrap;
}
.em-bar nav a[aria-current="page"],
.em-bar nav a:hover,
.em-foot nav a:hover { color: #3d5c3a !important; }

.em-crumb {
  display: none;
}

.em-foot {
  background: #efeae1;
  color: #1c1915;
  border-top: 1px solid #1c1915;
  padding: 22px max(20px, calc((100% - 1120px) / 2)) 26px;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1rem;
  line-height: 1.5;
}
.em-foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
}
.em-tag {
  flex: 1 1 16rem;
  margin: 0 !important;
  color: #5e584f !important;
  font-size: 1rem !important;
}
.em-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-left: auto;
}
.em-also {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 4px 0 0 !important;
  color: #5e584f !important;
}
.em-also span {
  font: 500 11px/1.4 "IBM Plex Mono", ui-monospace, monospace !important;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.em-also a {
  color: #1c1915 !important;
  font-family: Fraunces, Georgia, serif !important;
  font-size: 1.05rem !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  text-decoration: underline;
  text-decoration-color: #3d5c3a !important;
  text-underline-offset: 0.18em;
}
.em-copy {
  flex: 1 1 100%;
  margin: 2px 0 0 !important;
  font: 400 11px/1 "IBM Plex Mono", ui-monospace, monospace !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5e584f !important;
}

/* Topic pages already have a chapter bar. Keep that as the only header. */
body.em-page { --em-bar-h: 0px; }
body.em-page > nav.nav { top: env(safe-area-inset-top, 0px) !important; }
body.em-page .em-bar {
  position: fixed;
  top: env(safe-area-inset-top, 0px);
  left: max(14px, calc((100% - 1200px) / 2));
  z-index: 80;
  width: auto;
  height: 56px;
  padding: 0;
  background: transparent;
  border: 0;
  pointer-events: none;
}
body.em-page .em-bar .em-brand { pointer-events: auto; }
body.em-page .em-bar nav { display: none !important; }
body.em-page .em-mark {
  width: 40px !important;
  height: 40px !important;
}
body.em-page > nav.nav {
  padding-left: calc(max(16px, (100% - 1200px) / 2) + 44px) !important;
}

body.em-page .em-foot {
  background: var(--velvet-3, #111416);
  color: var(--stage-2, #d9d0c4);
  border-top: 1px solid color-mix(in srgb, var(--stage-ink, #f4efe6) 18%, transparent);
  padding: 16px max(16px, calc((100% - 1200px) / 2)) 20px;
}
body.em-page .em-tag { display: none; }
body.em-page .em-foot .em-mark {
  width: 36px !important;
  height: 36px !important;
}
body.em-page .em-foot nav a,
body.em-page .em-also a {
  color: var(--stage-ink, #f4efe6) !important;
}
body.em-page .em-foot nav a:hover,
body.em-page .em-also a:hover { color: var(--gold, #e6b85a) !important; }
body.em-page .em-also span,
body.em-page .em-copy { color: var(--stage-2, #d9d0c4) !important; }
body.em-page .em-also a { text-decoration-color: var(--gold, #e6b85a) !important; }

@media (max-width: 760px) {
  .em-bar { gap: 12px; padding-inline: 14px; }
  .em-word { font-size: 1.05rem; margin-left: 8px; }
  .em-mark { width: 36px !important; height: 36px !important; }
  body.em-home .em-bar nav { flex: 1; min-width: 0; }
  .em-bar nav { gap: 12px; }
  .em-bar nav a,
  .em-foot nav a { letter-spacing: 0.08em !important; }
  .em-foot nav { margin-left: 0; }
  body.em-page .em-mark { width: 30px !important; height: 30px !important; }
  .em-top { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
}

.em-top {
  position: fixed;
  z-index: 450;
  right: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #1c1915;
  border-radius: 50%;
  background: #1c1915;
  color: #efeae1;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(28, 25, 21, 0.18);
}
.em-top[hidden] { display: none; }
.em-top:hover { background: #3d5c3a; border-color: #3d5c3a; color: #efeae1; }
.em-top:focus-visible { outline: 3px solid #3d5c3a; outline-offset: 3px; }
.em-top svg { display: block; }

.em-film {
  box-sizing: border-box;
  scroll-margin-top: 72px;
  padding: 8px max(16px, calc((100% - 1200px) / 2)) 36px;
  background: var(--ground, #111416);
  color: var(--ink, #1c1915);
}
.em-film * { box-sizing: border-box; }
.em-film-kicker {
  margin: 0 0 8px;
  font: 500 0.72rem/1 "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold, #3d5c3a);
}
.em-film h2 {
  margin: 0 0 16px;
  max-width: none;
  width: 100%;
  font-family: Fraunces, Georgia, serif;
  font-weight: 560;
  font-size: clamp(1.55rem, 2.2vw, 2.05rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-transform: none;
  text-wrap: wrap;
}
.em-film-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}
.em-film-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.em-film-fallback {
  margin: 10px 0 0;
  font: 500 0.72rem/1 "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.em-film-fallback a { color: inherit; }
