/* Local draft only: darker, full-opacity text on fact pages and the fact card.
   Uses the site ink (#141414) instead of a faded mid-animation look. */
/* Do not set animation:none on * after load — that freezes fadeUp mid-opacity. */
html.shot-static body.nav-open .nav > a,
html.shot-static body.nav-open .nav .menu a {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}
.info-page,
.info-page h1,
.info-page h2,
.info-page h3,
.info-page p,
.info-page li,
.info-page td,
.info-page th,
.info-page strong,
.info-page summary,
.info-page a {
  color: #141414;
  opacity: 1;
}
.info-page .muted {
  color: #3a342e;
  opacity: 1;
}
#fact-panel,
#fact-panel strong,
#fact-title,
#fact-text,
#fact-more,
#fact-pro,
#fact-rag,
#fact-q,
#fact-a {
  color: #141414;
  opacity: 1;
}
#fact-panel .tease-kicker,
#fact-sub,
#fact-upd,
#fact-disc,
#fact-panel .tease-kicker a,
#fact-panel .tease-kicker select {
  color: #3a342e;
  opacity: 1;
}
#random-fact #fact-panel {
  grid-column: span 4;
  align-content: start;
  cursor: pointer;
}
@media (max-width: 980px) {
  #random-fact #fact-panel { grid-column: auto; }
}
#fact-cats.shop-filters {
  max-width: var(--max, 1100px);
  margin: .4rem auto 1rem;
}
#fact-lang {
  font: inherit;
  font-size: .9rem;
  max-width: 22rem;
}

/* ---- Lined notebook (same recipe as the logo .brand-paper): cream paper,
   blue ruled lines, red margin. One line unit (--nb-lh) for both the
   background rules and the text. Letters sit ON the rules (baseline). */
.fact-notebook,
#fact-panel.tease-card,
#fact-root.info-page {
  --nb-lh: 27px;
  --nb-base: 19px;
  --nb-rule: 1px;
  position: relative;
  color: #141414;
  line-height: var(--nb-lh);
  background-color: #f7f0de;
  background-image: repeating-linear-gradient(
    #f7f0de 0 var(--nb-base),
    #c9d7ea var(--nb-base) calc(var(--nb-base) + var(--nb-rule)),
    #f7f0de calc(var(--nb-base) + var(--nb-rule)) var(--nb-lh)
  );
  background-size: 100% var(--nb-lh);
  background-origin: padding-box;
  background-clip: padding-box;
  background-position: 0 0;
  background-repeat: repeat;
  box-shadow: 0 8px 18px rgba(40, 24, 8, .12), 0 1px 0 rgba(255,255,255,.6) inset;
  padding-block: var(--nb-lh);
  padding-inline-start: 2.15rem;
  padding-inline-end: 1.45rem;
  box-sizing: border-box;
}
#fact-panel.tease-card {
  display: flex !important;
  flex-direction: column;
  gap: 0 !important;
  justify-content: flex-start;
}
.fact-notebook.is-rtl-fact,
#fact-panel.tease-card[dir="rtl"],
#fact-root.info-page.is-rtl-fact {
  padding-inline-start: 1.45rem;
  padding-inline-end: 2.15rem;
}
.fact-notebook.is-rtl-fact::before,
#fact-panel.tease-card[dir="rtl"]::before,
#fact-root.info-page.is-rtl-fact::before {
  inset-inline-start: auto;
  inset-inline-end: 22px;
}
.fact-notebook::before,
#fact-panel.tease-card::before,
#fact-root.info-page::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 22px;
  width: 1.5px;
  background: #e8a8a8;
  pointer-events: none;
  z-index: 0;
}
.fact-notebook > *,
#fact-panel.tease-card > *,
#fact-root.info-page > * {
  position: relative;
  z-index: 1;
  margin: 0;
  line-height: var(--nb-lh);
}
#fact-root.info-page,
#fact-root.info-page p,
#fact-root.info-page li,
#fact-root.info-page td,
#fact-root.info-page th,
#fact-root.info-page summary,
#fact-root.info-page .muted,
#fact-text,
#fact-sub,
#fact-disc,
#fact-panel,
#fact-panel .tease-kicker,
#fact-panel strong,
#fact-title {
  line-height: var(--nb-lh);
  margin-top: 0;
  margin-bottom: 0;
}
/* Smaller meta text: shift the baseline down to --nb-base (16px) */
#fact-panel .tease-kicker,
#fact-sub,
#fact-disc,
#fact-root.info-page .muted,
#fact-root.info-page summary {
  padding-top: 2px;
  margin-bottom: -2px;
  box-sizing: border-box;
}
#fact-root.info-page h1 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: calc(2 * var(--nb-lh));
  color: #141414;
  padding-top: 6px;
  margin: 0 0 21px;
}
#fact-root.info-page h2 {
  color: #141414;
  line-height: var(--nb-lh);
  margin: var(--nb-lh) 0 0;
}
#fact-root.info-page table { background: transparent; margin: 0; }
#fact-root.info-page th,
#fact-root.info-page td {
  line-height: var(--nb-lh);
  padding-top: 0;
  padding-bottom: 0;
  vertical-align: baseline;
}
#fact-panel #fact-svg {
  width: 18px;
  height: 18px;
  vertical-align: -3px;
  display: inline-block;
}
#fact-panel strong {
  display: block;
  line-height: var(--nb-lh);
  font-size: 1.05rem;
}
#fact-root.info-page .fact-illu {
  line-height: 0;
  height: calc(4 * var(--nb-lh));
  margin: 0 0 var(--nb-lh);
  padding: 0;
}
#fact-root.info-page .fact-illu img {
  width: calc(4 * var(--nb-lh));
  height: calc(4 * var(--nb-lh));
  display: block;
}

/* ---- Site language picker: stay a dropdown on mobile, not a wrapped chip list ---- */
@media (max-width: 720px) {
  .nav .lang-menu > .menu-btn,
  .nav .lang-menu > .lang-btn {
    display: flex !important;
    width: 100%;
    align-items: center;
    justify-content: flex-start;
    gap: .4rem;
    text-align: start;
    font-size: 1.32rem;
    font-weight: 650;
    line-height: 1.25;
    padding: 0.72rem 0.15rem;
    opacity: 1 !important;
    transform: none !important;
    background: none;
    border: 0;
    color: inherit;
    cursor: pointer;
  }
  .nav .lang-menu > .menu-btn::after,
  .nav .lang-menu > .lang-btn::after {
    display: inline-block !important;
    content: "";
    width: 0;
    height: 0;
    margin-inline-start: .45rem;
    border-inline-start: 5px solid transparent;
    border-inline-end: 5px solid transparent;
    border-top: 6px solid currentColor;
    opacity: .7;
  }
  .nav .lang-menu > .menu {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    position: static !important;
    display: none !important;
    width: 100%;
    max-height: min(22rem, 60vh);
    overflow-y: auto;
    box-shadow: none !important;
    border: 1px solid var(--line, #e6dfd4) !important;
    border-radius: 8px;
    background: #fffaf3 !important;
    padding: .2rem .4rem !important;
    margin: .15rem 0 .5rem;
  }
  body .nav .lang-menu.is-open > .menu,
  body .nav .lang-menu[open] > .menu {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    align-items: stretch !important;
  }
  .nav .lang-menu .menu a {
    font-size: 1.05rem !important;
    padding: 0.5rem 0.25rem !important;
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .nav .lang-menu.is-open > .menu-btn::after,
  .nav .lang-menu.is-open > .lang-btn::after {
    position: static !important;
    transform: none !important;
    left: auto !important;
    top: auto !important;
    border: 0 !important;
    border-inline-start: 5px solid transparent !important;
    border-inline-end: 5px solid transparent !important;
    border-top: 6px solid currentColor !important;
    z-index: auto !important;
  }
}
/* ---- Fact language: discreet 🌐 + search (never render all 185) ---- */
#fact-panel,
#fact-root.fact-notebook {
  position: relative;
  z-index: 8;
}
.fact-lang-search,
#fact-panel.tease-card > .fact-lang-search,
#fact-root.info-page > .fact-lang-search,
.fact-notebook > .fact-lang-search {
  position: absolute !important;
  top: 0.35rem;
  inset-inline-end: 0.45rem;
  z-index: 20;
  line-height: 1;
  margin: 0 !important;
  padding: 0 !important;
}
#fact-root.info-page.is-rtl-fact > .fact-lang-search {
  inset-inline-end: auto;
  inset-inline-start: 0.45rem;
}
.fact-lang-orb {
  appearance: none;
  -webkit-appearance: none;
  display: inline-grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #141414;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  opacity: .85;
}
.fact-lang-orb:hover,
.fact-lang-search.is-open .fact-lang-orb { opacity: 1; }
.fact-lang-pop {
  position: absolute;
  top: calc(100% + 4px);
  inset-inline-end: 0;
  z-index: 30;
  width: min(22rem, calc(100vw - 2rem));
  background: #fffaf3;
  border: 1px solid var(--line, #e6dfd4);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(40, 24, 8, .12);
  padding: .35rem;
  transform: none !important;
}
.fact-lang-pop[hidden] { display: none !important; }
.fact-lang-pop #fact-lang-q {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.35;
  color: #141414;
  background: #fff;
  border: 1px solid var(--line, #e6dfd4);
  border-radius: 6px;
  padding: .35rem .55rem;
}
.fact-lang-pop #fact-lang-list {
  list-style: none;
  margin: .2rem 0 0;
  padding: 0;
  max-height: 14rem;
  overflow-y: auto;
}
.fact-lang-pop #fact-lang-list li { margin: 0; padding: 0; }
.fact-lang-pop #fact-lang-list button {
  display: block;
  width: 100%;
  text-align: start;
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.35;
  color: #141414;
  background: none;
  border: 0;
  border-radius: 6px;
  padding: .35rem .5rem;
  cursor: pointer;
  direction: ltr;
  unicode-bidi: isolate;
}
.fact-lang-pop #fact-lang-list button:hover,
.fact-lang-pop #fact-lang-list button.is-on,
.fact-lang-pop #fact-lang-list button[aria-selected="true"] {
  background: #f3eee4;
}
.fact-tools-row { text-transform: none; }

/* Music FAB stays where the site puts it; give the fact card/page room so
   the Language / tools row is never under it on a phone. */
@media (max-width: 720px) {
  #fact-panel.tease-card,
  #fact-root.info-page {
    padding-bottom: calc(var(--nb-lh) * 2 + 64px);
  }
  .fact-tools-row,
  #fact-panel .fact-tools-row {
    padding-inline-start: 3.6rem;
    box-sizing: border-box;
  }
  .fact-lang-pop {
    width: min(20rem, calc(100vw - 1.5rem));
  }
}

