/* ALLRefer lean shell + responsive overlay (static mirror). */

:root {
  --ar-ink: #1a1f1c;
  --ar-muted: #5c675f;
  --ar-paper: #f3f0e8;
  --ar-accent: #0f6b4c;
  --ar-line: #d5d0c4;
  --ar-measure: 46rem;
}

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  max-width: 100vw;
  overflow-x: clip;
  margin: 0;
}

img, video, iframe, embed, object, svg {
  max-width: 100%;
  height: auto;
}

/* --- Hide Boombox / WP chrome (lean shell replaces it) --- */
body:not(.allrefer-hub) #header,
body:not(.allrefer-hub) .header.top-logo,
body:not(.allrefer-hub) #mobile-navigation,
body:not(.allrefer-hub) #mobile-nav-bg,
body:not(.allrefer-hub) #footer,
body:not(.allrefer-hub) .site-footer,
body:not(.allrefer-hub) #secondary,
body:not(.allrefer-hub) aside.sidebar,
body:not(.allrefer-hub) .widget-area,
body:not(.allrefer-hub) .account-box,
body:not(.allrefer-hub) .create-post,
body:not(.allrefer-hub) .bb-create-post,
body:not(.allrefer-hub) .user-box,
body:not(.allrefer-hub) .top-search,
body:not(.allrefer-hub) .search-form,
body:not(.allrefer-hub) #searchform,
body:not(.allrefer-hub) form[action*="?s="],
body:not(.allrefer-hub) .login-link,
body:not(.allrefer-hub) a[href*="wp-login"],
body:not(.allrefer-hub) a[href*="wp-admin"],
body:not(.allrefer-hub) .comments-area,
body:not(.allrefer-hub) .comment-respond,
body:not(.allrefer-hub) #respond,
body:not(.allrefer-hub) .zf-create-box,
body:not(.allrefer-hub) .zf-create-page,
body:not(.allrefer-hub) .zf-create-popup,
body:not(.allrefer-hub) #sign-in,
body:not(.allrefer-hub) #reset-password,
body:not(.allrefer-hub) #social-box,
body:not(.allrefer-hub) .zombify-create-popup,
body:not(.allrefer-hub) .widget_mc4wp_form_widget,
body:not(.allrefer-hub) .widget_create_post,
body:not(.allrefer-hub) .advertisement,
body:not(.allrefer-hub) a[href*="plus.google.com"],
body:not(.allrefer-hub) .icon-google-plus,
body:not(.allrefer-hub) .fb-page,
body:not(.allrefer-hub) .fb_iframe_widget,
body:not(.allrefer-hub) .mashsb-box,
body:not(.allrefer-hub) .mashsb-buttons,
body:not(.allrefer-hub) .post-share-box {
  display: none !important;
}

/* Break Boombox fixed magazine shell */
#mainContainer,
.bb-row,
.site,
#page,
#wrapper,
.wrapper,
.container,
.container-fluid {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

#main,
.site-main,
.content-area,
.primary {
  float: none !important;
  width: 100% !important;
  max-width: var(--ar-measure) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 1rem 1.1rem 2.5rem !important;
  box-sizing: border-box;
}

.entry-content,
.the-content,
article.single,
article.post {
  max-width: 100% !important;
}

.entry-title,
h1.entry-title {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem) !important;
  line-height: 1.25 !important;
  word-wrap: break-word;
}

.entry-content h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem) !important;
  margin-top: 1.5rem !important;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.table-scroll table,
.entry-content table,
article table,
table {
  max-width: 100%;
}

/* Injected lean shell */
.ar-lean-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding: 0.85rem 1.1rem;
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(243, 240, 232, 0.94);
  border-bottom: 1px solid var(--ar-line);
  backdrop-filter: blur(8px);
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
}

.ar-lean-brand {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--ar-ink);
  text-decoration: none;
}

.ar-lean-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
}

.ar-lean-nav a {
  color: var(--ar-muted);
  text-decoration: none;
  font-size: 0.95rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.ar-lean-nav a:hover,
.ar-lean-nav a:focus {
  color: var(--ar-accent);
}

.ar-lean-burger {
  display: none;
  border: 1px solid var(--ar-line);
  background: #fff;
  padding: 0.45rem 0.7rem;
  min-height: 44px;
  min-width: 44px;
  cursor: pointer;
  font: inherit;
  color: var(--ar-ink);
}

.ar-lean-drawer {
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
  padding: 0.25rem 0 0.5rem;
}

.ar-lean-drawer a {
  color: var(--ar-ink);
  text-decoration: none;
  padding: 0.65rem 0.25rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--ar-line);
}

body.ar-drawer-open .ar-lean-drawer {
  display: flex;
}

.ar-lean-footer {
  max-width: 52rem;
  margin: 0 auto;
  padding: 1.5rem 1.1rem 2.5rem;
  border-top: 1px solid var(--ar-line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.9rem;
}

.ar-lean-footer a {
  color: var(--ar-muted);
  text-decoration: none;
}

.ar-lean-note {
  flex: 1 1 100%;
  margin: 0.35rem 0 0;
  color: var(--ar-muted);
  font-size: 0.78rem;
}

.ar-related-stories {
  clear: both;
  margin: 2rem 0 1.5rem;
  padding: 1.25rem 0 0;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}
.ar-related-stories h2 {
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
}
.ar-related-stories ul {
  margin: 0;
  padding-left: 1.2rem;
}

.skip-link {
  position: absolute;
  left: -999px;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 50;
  background: #fff;
  padding: 0.5rem 0.75rem;
}

/* Reference legacy table chrome: keep readable */
body[background],
body.ar-lean-on {
  background: var(--ar-paper) !important;
}

@media (max-width: 768px) {
  .ar-lean-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .ar-lean-nav-desktop {
    display: none !important;
  }
  #main,
  .site-main,
  .content-area {
    padding-left: 0.85rem !important;
    padding-right: 0.85rem !important;
  }
  .sidebar,
  .widget-area,
  aside.sidebar,
  .col-md-8,
  .col-md-4 {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  h1, h2, h3 {
    overflow-wrap: break-word;
  }
}

@media (min-width: 769px) {
  .ar-lean-drawer {
    display: none !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .ar-lean-header {
    animation: ar-header-in 0.45s ease-out;
  }
  #main, .site-main, .ar-hub-main {
    animation: ar-main-in 0.5s ease-out 0.05s both;
  }
}

@keyframes ar-header-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
@keyframes ar-main-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
