/* ═══ Any-A.info: shared menu + mobile readability (loaded last on every page) ═══ */

/* One menu only: the duplicate header link row overlapped the pill menu */
header.nav .nav-links { display: none !important; }

/* ── Menu button (phones/tablets) ── */
.mnav-btn {
  display: none; position: fixed; z-index: 10001;
  top: calc(10px + env(safe-area-inset-top, 0px)); right: 12px;
  width: 48px; height: 48px; border-radius: 14px; border: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 2px 18px rgba(0,0,0,.1); cursor: pointer; padding: 0;
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.mnav-btn span { display: block; width: 22px; height: 2.5px; border-radius: 2px; background: #0b0b12; transition: transform .25s, opacity .2s; }
.mnav-open .mnav-btn span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.mnav-open .mnav-btn span:nth-child(2) { opacity: 0; }
.mnav-open .mnav-btn span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.mnav-panel {
  position: fixed; inset: 0; z-index: 10000; display: flex; flex-direction: column;
  padding: calc(80px + env(safe-area-inset-top, 0px)) 24px calc(28px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,.97); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .22s, transform .22s, visibility 0s .22s;
  overflow-y: auto; font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}
.mnav-open .mnav-panel { opacity: 1; visibility: visible; transform: none; transition: opacity .22s, transform .22s; }
.mnav-panel::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg,#00d4f0,#9b5cff 50%,#ff2d8a); }
.mnav-panel a.mnav-link {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 26px; font-weight: 700; line-height: 1.2; color: #0b0b12; text-decoration: none;
  padding: 16px 6px; border-bottom: 1px solid #e4e4ea; letter-spacing: -.01em;
}
.mnav-panel a.mnav-link::after { content: "→"; font-weight: 500; color: #6d28d9; opacity: .55; }
.mnav-panel a.mnav-link.active { background: linear-gradient(100deg,#0369a1,#6d28d9 50%,#be185d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mnav-panel a.mnav-link.active::after { content: "•"; color: #be185d; opacity: 1; }
.mnav-cta, .mnav-install {
  display: block; text-align: center; margin-top: 22px; padding: 17px 20px; border-radius: 99px;
  font-size: 19px; font-weight: 700; text-decoration: none; border: 0; cursor: pointer; font-family: inherit;
}
.mnav-cta { background: #0b0b12; color: #fff; }
.mnav-install { background: linear-gradient(100deg,#0369a1,#6d28d9 50%,#be185d); color: #fff; width: 100%; }
.mnav-install[hidden] { display: none; }
.mnav-hint { margin-top: 14px; font-size: 15px; line-height: 1.5; color: #3d3d4a; text-align: center; }
.mnav-hint[hidden] { display: none; }
html.mnav-open, html.mnav-open body { overflow: hidden; }

/* Kintsugi figure (phones only; desktop keeps the full-bleed image) */
.kin-fig { display: none; }

@media (max-width: 820px) {
  .site-nav { display: none !important; }
  .mnav-btn { display: flex; }

  /* Header bar: room for the button, bigger brand */
  header.nav .nav-inner { padding-right: 72px; min-height: 68px; }
  .brand { font-size: 20px !important; }
  .brand-icon { width: 38px !important; height: 38px !important; font-size: 18px !important; }

  /* Keep page-header items clear of the menu button */
  .site-header .back-link { display: none !important; }
  .head-actions { margin-right: 58px !important; }

  /* ── Readability floor: shared ── */
  .label-sm, .kicker, .pt-eyebrow, .hero-eyebrow, p.kicker { font-size: 15px !important; letter-spacing: .14em !important; line-height: 1.4 !important; }
  .conn-sub { font-size: 17px !important; line-height: 1.5 !important; }
  .sub-lg { font-size: 22px !important; }
  p.fine { font-size: 16px !important; line-height: 1.6 !important; }
  .site-disclaimer p { font-size: 14.5px !important; line-height: 1.65 !important; opacity: .95 !important; }
  .tld { font-size: 17px !important; }

  /* Home: kintsugi card — whole bowl + caption as real text */
  .kin-card { flex-direction: column; justify-content: center; gap: 28px; }
  .kin-card > .ghost.rise { display: none; }
  .kin-fig { display: block; margin: 0 calc(-1 * var(--pad, 24px)); position: relative; z-index: 1; }
  .kin-fig img { display: block; width: 100%; height: auto; }
  .kin-fig figcaption {
    margin-top: 14px; padding: 0 var(--pad, 24px); text-align: center;
    font: italic 400 21px/1.45 Georgia, "Times New Roman", serif; color: #4a4a55;
  }
  .kin-fig figcaption b { font-weight: 400; color: #a1782a; }
  .kin-fig figcaption .swash { display: block; width: 150px; height: 2px; margin: 12px auto 0; border-radius: 2px;
    background: linear-gradient(90deg, transparent, #c9a24a 30%, #c9a24a 70%, transparent); }

  /* Religion */
  .jt-prelude { font-size: 15px !important; }
  .jt-vs { font-size: 15px !important; }
  p.label, .hp-card-label { font-size: 15px !important; }

  /* Fellowships */
  .filter-btn { font-size: 15px !important; padding: 10px 16px !important; }
  .cat-label { font-size: 14px !important; }
  .cat-count { font-size: 15px !important; }
  th { font-size: 14px !important; }
  td.f-helps, td.f-founded, .act-link { font-size: 15.5px !important; }
  .f-card-helps { font-size: 16.5px !important; }
  .f-card-meta { font-size: 14.5px !important; }
  .note-badge { font-size: 13.5px !important; line-height: 1.45 !important; }
  .crisis, .crisis a { font-size: 16px !important; }

  /* History */
  .hero-sub { font-size: 17px !important; }
  .ml-title { font-size: 11px !important; }
  .ml-item, .cl-row { font-size: 12.5px !important; }
  .s-label { font-size: 11.5px !important; }
  .tick-row span { font-size: 11px !important; }
  .mini-chart-label { font-size: 11px !important; }
  .play-btn { font-size: 15px !important; }
  footer.footnote, footer.footnote * { font-size: 14px !important; line-height: 1.6 !important; }

  /* Atlas */
  .pill { font-size: 14px !important; }
  .eyebrow { font-size: 13px !important; }
  .year-caption { font-size: 15px !important; }
  .kpi span { font-size: 12px !important; }
  .map-note, .legend-map span { font-size: 12px !important; }
  .endyear { font-size: 13px !important; }
  .control-deck .ticks span { font-size: 11px !important; }
  .filter { font-size: 14px !important; padding: 8px 13px !important; }
  .section-label span { font-size: 12px !important; }
  #cards .card .date, #cards .card .metric { font-size: 12.5px !important; }
  #cards .card h3 { font-size: 18px !important; }
  #cards .card p { font-size: 14px !important; line-height: 1.45 !important; }
  .detail .full { font-size: 14px !important; }
  .detail dt, .detail dd { font-size: 15px !important; }
  .detail .narrative { font-size: 16.5px !important; line-height: 1.6 !important; }
  .detail .source-link { font-size: 15px !important; }
  .detail .confidence { font-size: 12px !important; }
  .method-grid > div { font-size: 15px !important; line-height: 1.55 !important; }
  .method-grid b { font-size: 15.5px !important; }
  .shell > footer span { font-size: 12.5px !important; }
  .source-list a b, .source-list a span { font-size: 14.5px !important; }
}
