/* Public-facing cleanup: keep Theme Tag data available to the app, but remove the standalone browser from The Case. */
#themes #theme-tag-browser {
  display: none !important;
}

/* The old Theme Tags rail reserved one-third of the desktop layout even after the rail was hidden. The Case now owns the full reading width. */
#themes.screen.active {
  display: block !important;
  width: 100%;
}

#themes > .theme-topic-header,
#themes > #theme-content,
#themes > #theme-guide-entry,
#themes > #theme-guide-detail,
#themes .theme-path-root,
#themes .theme-path-detail,
#themes .case-detail-shell {
  width: 100%;
  max-width: none;
  min-width: 0;
}

/* Clean dark footer. */
.site-footer {
  position: relative;
  left: 50%;
  width: 100vw;
  margin-top: 64px;
  margin-left: -50vw;
  padding: 0 22px;
  border-top: 0;
  background: #11110f;
  color: #f7f5ef;
}

.site-footer-main,
.site-footer-bottom {
  width: 100%;
  max-width: 1136px;
  margin-left: auto;
  margin-right: auto;
}

.site-footer-main {
  display: grid;
  grid-template-columns: minmax(0,1.35fr) repeat(2,minmax(150px,.55fr));
  gap: 34px;
  padding: 38px 0 28px;
}

.site-footer-brand strong {
  display: block;
  margin-bottom: 8px;
  color: #fffdf8;
  font-size: 1.08rem;
  letter-spacing: .01em;
}

.site-footer-brand p {
  max-width: 470px;
  margin: 0;
  color: #aaa69d;
  font-size: .75rem;
  line-height: 1.6;
}

.site-footer-brand .site-footer-tagline {
  color: #fffdf8;
  font-weight: 700;
}

.site-footer-brand .site-footer-description {
  margin-top: 5px;
  color: #aaa69d;
}

.site-footer-kicker {
  display: block;
  margin-bottom: 9px;
  color: #cdb28d;
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.site-footer-links {
  display: grid;
  align-content: start;
  gap: 7px;
}

.site-footer-link {
  width: max-content;
  max-width: 100%;
  border: 0;
  padding: 2px 0;
  background: transparent;
  color: #aaa69d;
  font: inherit;
  font-size: .72rem;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.site-footer-link:hover,
.site-footer-link:focus-visible {
  color: #fffdf8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 0 20px;
  border-top: 1px solid #302f2b;
}

.site-footer-bottom-line {
  margin: 0;
  color: #858179;
  font-size: .64rem;
  line-height: 1.45;
}

.site-footer-credits {
  position: relative;
  flex: 0 0 auto;
}

.site-footer-credits summary {
  color: #aaa69d;
  font-size: .64rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}

.site-footer-credits summary:hover,
.site-footer-credits summary:focus-visible {
  color: #fffdf8;
}

.site-footer-credits summary::-webkit-details-marker { display: none; }
.site-footer-credits summary::after { content: ' +'; color: #cdb28d; }
.site-footer-credits[open] summary::after { content: ' −'; }

.site-footer-credit-copy {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: min(620px, calc(100vw - 36px));
  padding: 14px 15px;
  border: 1px solid #3b3934;
  border-radius: 12px;
  background: #1b1a18;
  box-shadow: 0 16px 42px rgba(0,0,0,.28);
  color: #bcb8af;
  font-size: .62rem;
  line-height: 1.55;
}

.site-footer-credit-copy p { margin: 0; }
.site-footer-credit-copy p + p { margin-top: 8px; }

@media (max-width: 760px) {
  .site-footer {
    margin-top: 42px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .site-footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 24px 18px;
    padding: 30px 0 22px;
  }
  .site-footer-brand { grid-column: 1 / -1; }
  .site-footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
  .site-footer-credit-copy {
    position: fixed;
    left: 18px;
    right: 18px;
    bottom: 84px;
    width: auto;
    max-height: 52vh;
    overflow: auto;
    z-index: 50;
  }
}