html {
  box-sizing: border-box;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

.font-select-happy {
  --site-font-family: "Trebuchet MS", "Arial Rounded MT Bold", Arial, Helvetica, sans-serif;
}

.font-select-spooky {
  --site-font-family: Georgia, "Times New Roman", Times, serif;
}

.font-select-whacky {
  --site-font-family: "Comic Sans MS", "Trebuchet MS", Arial, Helvetica, sans-serif;
}

.font-select-classic {
  --site-font-family: Garamond, Georgia, "Times New Roman", Times, serif;
}

.font-select-clean {
  --site-font-family: Verdana, Helvetica, Arial, sans-serif;
}

body.stooges-site {
  margin: 0;
  padding: 28px;
  background: #07140f;
  color: #e5eadb;
  font-family: var(--site-font-family, Arial, Helvetica, Geneva, Swiss, SunSans-Regular, sans-serif);
}

body.stooges-site a {
  color: #ffffff;
  transition: color 150ms ease;
}

body.stooges-site a:visited {
  color: #b6d7b8;
}

body.stooges-site a:hover,
body.stooges-site a:focus {
  color: #75eeff;
}

body.stooges-site a:visited:hover,
body.stooges-site a:visited:focus {
  color: #d89a5d;
}

body.stooges-site a:active {
  color: #d89a5d;
}

.stooges-site .page-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px;
  background: #10251b;
  border: 2px solid #d89a5d;
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.35),
    inset 0 0 0 3px rgba(66, 102, 71, 0.65);
}

.stooges-site .nav-frame {
  display: block;
  width: 150px;
  height: 380px;
  border: 0;
}

.modern-page .site-layout {
  display: flex;
  gap: 34px;
  align-items: flex-start;
}

.modern-page .sidebar {
  width: 150px;
  flex: 0 0 150px;
}

.modern-page .main-content {
  flex: 1 1 auto;
  min-width: 0;
}

.modern-page .page-title {
  display: inline-block;
  margin: 0 0 12px;
  padding: 4px 10px 6px;
  background: #174a2a;
  color: #75eeff;
  border: 2px solid #d89a5d;
  font-size: 30px;
  line-height: 1.1;
  font-style: italic;
}

.page-intro {
  margin: 0 0 20px;
  color: #d7dfc9;
  font-size: 16px;
  line-height: 1.45;
}

.hero-image,
.artifact-card {
  background: #183622;
  border: 2px dashed #d89a5d;
  box-shadow: 4px 4px 0 rgba(7, 20, 15, 0.75);
}

.hero-image {
  padding: 10px;
}

.hero-image {
  margin: 0 0 22px;
}

.artifact-card {
  padding: 10px;
  min-width: 0;
  overflow: hidden;
  
}

.story .artifact-card {
  margin-top: 10px;
}

.hero-image img,
.artifact-card img {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
}

.more-link {
  margin: 22px 0 0;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.45;
}

.page-note {
  margin: 24px 0 0;
  color: #b9caae;
  font-size: 11px;
  line-height: 1.35;
}

.site-footer {
  display: block;
  margin: 28px auto 0;
  clear: both;
  color: #757e7e;
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
}

.caption {
  display: inline-block;
  margin: 8px 0 0;
  padding: 4px 7px;
  background: #d89a5d;
  color: #07140f;
  font-size: 12px;
  font-weight: bold;
}

.intro-grid,
.story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.story-single {
  grid-template-columns: 1fr;
}

.intro-grid {
  margin-bottom: 24px;
}

.story > div {
  padding: 6px;
  border-top: 2px dashed rgba(216, 154, 93, 0.8);
}

.intro-grid h2,
.story h2,
.artifact-section h2 {
  margin: 0 0 4px;
  color: #d89a5d;
  font-size: 18px;
  text-transform: uppercase;
}

.artifact-section > h2 + p {
  margin: 0 0 12px;
}

.intro-grid p,
.story p,
.source-list {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.5;
}

.source-list {
  padding-left: 18px;
  font-size: 12px;
}

.article-list {
  margin: 0 0 18px 18px;
  padding: 0;
  list-style: none;
  font-size: 15px;
  line-height: 1.6;
}

.article-list li {
  position: relative;
  margin: 0 0 7px;
  padding-left: 30px;
}

.article-list li::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 4px;
  width: 14px;
  height: 14px;
  border: 2px solid hsl(var(--article-badge-hue, 188), 84%, 63%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, #fff6bd 0 2px, transparent 3px),
    radial-gradient(circle, hsl(var(--article-badge-hue, 188), 92%, 45%) 0 4px, #162419 5px 100%);
  box-shadow:
    0 0 0 1px #d9984e,
    0 0 8px rgba(117, 238, 255, 0.45);
}

.artifact-section {
  padding-top: 22px;
  border-top: 1px solid #426647;
}

.artifact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

/* NO-CROP RULE (all minisites, Nov 8, 2026): card pictures are shown WHOLE (object-fit: contain), never cropped,
   so faces and subjects are not cut off. A taller fixed box keeps the grid even; short or narrow pictures get
   empty space at the sides, not a crop. Do not switch these back to cover. */
.artifact-card img {
  max-width: 100%;
  height: 200px;
  object-fit: contain;
  object-position: center;
}

.artifact-grid-crop .artifact-card img {
  width: 100%;
  object-fit: contain;
  object-position: center;
}

.artifact-grid-crop-med .artifact-card img {
  width: 100%;
  object-fit: contain;
  object-position: center;
}

.artifact-grid-contain .artifact-card img {
  width: auto;
  height: auto;
  max-width: 125px;
  object-fit: contain;
}

.artifact-card a {
  display: block;
  margin-top: 7px;
  color: #ffffff;
  font-size: 12px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.artifact-card p {
  margin: 5px 0 0;
  color: #d7dfc9;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.stooges-site:not(.stooges-home) .page-title,
.stooges-site:not(.stooges-home) .hero-image,
.stooges-site:not(.stooges-home) .intro-grid > div,
.stooges-site:not(.stooges-home) .story > div,
.stooges-site:not(.stooges-home) .artifact-card,
.stooges-site:not(.stooges-home) .article-list li {
  transform-origin: 50% 55%;
  animation: stoogeTileSquash 520ms cubic-bezier(.2, .9, .2, 1.15) both;
}

.stooges-site:not(.stooges-home) .hero-image {
  animation-delay: 70ms;
}

.stooges-site:not(.stooges-home) .intro-grid > div:nth-child(1),
.stooges-site:not(.stooges-home) .story > div:nth-child(1),
.stooges-site:not(.stooges-home) .artifact-card:nth-child(1),
.stooges-site:not(.stooges-home) .article-list li:nth-child(1) {
  animation-delay: 120ms;
}

.stooges-site:not(.stooges-home) .intro-grid > div:nth-child(2),
.stooges-site:not(.stooges-home) .story > div:nth-child(2),
.stooges-site:not(.stooges-home) .artifact-card:nth-child(2),
.stooges-site:not(.stooges-home) .article-list li:nth-child(2) {
  animation-delay: 170ms;
}

.stooges-site:not(.stooges-home) .artifact-card:nth-child(3),
.stooges-site:not(.stooges-home) .article-list li:nth-child(3) {
  animation-delay: 220ms;
}

.stooges-site:not(.stooges-home) .artifact-card:nth-child(n+4),
.stooges-site:not(.stooges-home) .article-list li:nth-child(n+4) {
  animation-delay: 270ms;
}

@keyframes stoogeTileSquash {
  0% {
    opacity: 0;
    transform: translateY(10px) scaleY(.72) scaleX(1.08);
  }
  58% {
    opacity: 1;
    transform: translateY(-2px) scaleY(1.09) scaleX(.96);
  }
  78% {
    opacity: 1;
    transform: translateY(1px) scaleY(.97) scaleX(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .stooges-site:not(.stooges-home) .page-title,
  .stooges-site:not(.stooges-home) .hero-image,
  .stooges-site:not(.stooges-home) .intro-grid > div,
  .stooges-site:not(.stooges-home) .story > div,
  .stooges-site:not(.stooges-home) .artifact-card,
  .stooges-site:not(.stooges-home) .article-list li {
    animation: none;
  }
}



body.nav-page {
  margin: 0;
  padding: 0;
  background: #10251b;
  color: #e5eadb;
  font-family: var(--site-font-family, Verdana, Helvetica, Arial, sans-serif);
}

.nav-page a {
  color: #ffffff;
  transition: color 150ms ease;
}

.nav-page a:visited {
  color: #b6d7b8;
}

.nav-page a:hover,
.nav-page a:focus {
  color: #75eeff;
}

.nav-page a:visited:hover,
.nav-page a:visited:focus {
  color: #d89a5d;
}

.nav-wrap {
  width: 150px;
  padding: 6px 0 0;
}

.brand {
  display: block;
  width: 124px;
  margin: 0 0 18px 8px;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 70px;
  height: auto;
  margin: 0 0 -3px 9px;
  border: 0;
}

.brand-title {
  display: inline-block;
  margin-top: 0;
  padding: 3px 9px 5px;
  background: #174a2a;
  color: #ffffff;
  font-family: var(--site-font-family, Arial, Helvetica, sans-serif);
  font-size: 22px;
  font-weight: bold;
  font-style: italic;
  line-height: 0.9;
}

.home-brand-intro .brand img {
  transform-origin: 50% 82%;
  animation: stoogesSideSwipe 700ms ease-out both;
}

.home-brand-intro .brand-title {
  animation: stoogesTitleSquash 620ms ease-out 160ms both, stoogesTitleGlow 920ms ease-out 650ms both;
}

@keyframes stoogesToolDrop {
  0% {
    opacity: 0;
    transform: translateY(-22px) rotate(-10deg) scale(.9);
  }
  58% {
    opacity: 1;
    transform: translateY(2px) rotate(5deg) scale(1.04);
  }
  72% {
    opacity: 1;
    transform: translateY(-1px) rotate(-3deg) scale(.99);
  }
  86% {
    opacity: 1;
    transform: translateY(0) rotate(1.4deg) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(0) scale(1);
  }
}

@keyframes stoogesSideSwipe {
  0% {
    opacity: 0;
    transform: translateX(-60px) rotate(-16deg);
  }
  65% {
    opacity: 1;
    transform: translateX(5px) rotate(5deg);
  }
  100% {
    opacity: 1;
    transform: translateX(0) rotate(0);
  }
}

@keyframes stoogesTitlePop {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(.92) skewX(-4deg);
  }
  68% {
    opacity: 1;
    transform: translateY(0) scale(1.045) skewX(-1deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) skewX(0);
  }
}

@keyframes stoogesTitleSquash {
  0% {
    opacity: 0;
    transform: scaleY(.35) scaleX(1.18);
  }
  60% {
    opacity: 1;
    transform: scaleY(1.13) scaleX(.94);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes stoogesTitleGlow {
  0% {
    box-shadow: 0 0 0 rgba(117, 238, 255, 0);
  }
  42% {
    box-shadow: 0 0 14px rgba(117, 238, 255, .76), 0 0 0 2px rgba(217, 161, 95, .35);
  }
  100% {
    box-shadow: 0 0 0 rgba(117, 238, 255, 0);
  }
}

.nav {
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--site-font-family, Verdana, Helvetica, Arial, sans-serif);
  font-size: 11px;
  font-weight: bold;
  line-height: 1.35;
}

.nav-prep .nav {
  visibility: hidden;
}

.nav li {
  position: relative;
  margin: 0 0 8px;
  padding-left: 19px;
}

.nav-timesync {
  position: relative;
  background: none;
}

.nav li::before,
.nav-timesync::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 0;
  width: 11px;
  height: 11px;
  border: 1px solid #75eeff;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, #fff6bd 0 1px, transparent 2px),
    radial-gradient(circle, #20b5c8 0 3px, #10251b 4px 100%);
  box-shadow:
    0 0 0 1px #d89a5d,
    0 0 5px rgba(117, 238, 255, 0.5);
}

.nav-timesync::before {
  top: 5px;
}

.nav .sub {
  margin-top: 4px;
  padding-left: 12px;
  color: #d9a15f;
  font-size: 10px;
  font-weight: normal;
}

.nav .sub a {
  font-weight: normal;
}

.feature-note {
  display: block;
  color: #d9a15f;
  font-style: italic;
  font-size: 10px;
  font-weight: normal;
}

.current,
.current:visited,
.current a {
  color: #75eeff;
}

body.animation-index {
  margin: 0;
  background: #07140f;
  color: #e5eadb;
  font-family: var(--site-font-family, Arial, Helvetica, Geneva, Swiss, SunSans-Regular, sans-serif);
}

body.animation-index a {
  color: #ffffff;
}

body.animation-index a:visited {
  color: #b6d7b8;
}

body.animation-index a:active {
  color: #d89a5d;
}

body.popup-page {
  margin: 8px;
  background: #000000;
  color: #ffffff;
  text-align: center;
}

body.popup-page a,
body.popup-page a:visited {
  color: #c0c0c0;
}

body.popup-page a:active {
  color: #ff0000;
}

body.popup-page img {
  max-width: 100%;
  height: auto;
}

body.ascii-popup {
  margin: 8px;
  background: #ffffff;
  color: #000000;
  font-family: "Courier New", Courier, Monaco, monospace;
  font-size: 10px;
  line-height: 1;
}


/* Start: Mobile / narrow screen styles */

/* Hide the phone badge until the narrow-screen rules turn it on. */

#mobile-indicator { display: none; }


/* Stack the page and loosen spacing for smaller screens. */
@media (max-width: 760px) {   
  #mobile-indicator {
    display: block;
  }
  
  body.stooges-site {
    padding: 12px;
  }

  .stooges-site .page-container {
    padding: 18px;
  }

  .modern-page .site-layout {
    display: flex;
    flex-direction: column;
    gap: 22px;
  }

  .modern-page .sidebar {
    width: 100%;
    flex: none;
    margin-bottom: 0;
  }

  .modern-page .nav-frame {
    width: 100%;
    height: 250px;
  }

  /* Let main content and grid sections use the full phone width. */
  .modern-page .main-content {
    width: 100%;
  }

  .intro-grid,
  .story {
    display: block;
  }

  .artifact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .artifact-card {
    margin-bottom: 14px;
  }

  /* Keep images and old table layouts from overflowing sideways. */
  .modern-page .main-content > img,
  .modern-page .main-content table {
    max-width: 100%;
    height: auto;
  }

  .modern-page .main-content blockquote {
    margin-left: 0;
    margin-right: 0;
  }

}

/* Mobile nav: only use mobile-only Timesync/nav styling when the frame is wide enough. */
@media (min-width: 300px) {
  .parent-is-narrow .nav-timesync {
    opacity: 0.45;
    filter: grayscale(1);
  }

  .parent-is-narrow .nav-timesync a {
    color: #9aad98;
    text-decoration: none;
  }

  .parent-is-narrow .nav-timesync::after {
    content: "(not available on mobile)";
    display: block;
    margin-top: 2px;
    color: #75866f;
    font-size: 9px;
    font-weight: normal;
    line-height: 1.2;
  }

  .parent-is-narrow .nav-wrap {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    width: auto;
    padding-top: 4px;
  }

  .parent-is-narrow .brand {
    flex: 0 0 124px;
    margin-bottom: 0;
  }

  .parent-is-narrow .nav {
    flex: 1 1 auto;
    min-width: 0;
    padding-top: 2px;
  }
}

/* Compact the nav frame for very short browser windows. */
@media (max-height: 180px) {
  .nav-wrap {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    width: auto;
    padding-top: 4px;
  }

  .brand {
    flex: 0 0 124px;
    margin-bottom: 0;
  }

  .nav {
    flex: 1 1 auto;
    min-width: 0;
    padding-top: 2px;
  }

}

/* Mobile indicator badge: small fixed lozenge in the corner. */

#mobile-indicator {
    position: fixed;
    top: 8px;
    right: 8px;
    z-index: 9500;      /* above page chrome, below lightbox overlay */
    box-sizing: border-box;
    max-width: 34px;
    overflow: hidden;
    padding: 4px 10px 4px 8px; /* added 6/15 top/right/bottom/left */
    font-size: 13px;
    line-height: 1.2;
    font-family: helvetica, arial, sans-serif;
    white-space: nowrap;
    color: #fff;
    background: rgba(0, 0, 0, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    opacity: 0.5;  /* added 6/15 */
    pointer-events: none;     /* inert on touch devices */
    transition: max-width 180ms ease-out, background-color 180ms ease-out, opacity 180ms ease-out;
}


/* desktop/mouse only: rolling over the lozenge reveals the text label */

@media (max-width: 760px) and (hover: hover) and (pointer: fine) {
  #mobile-indicator {
    pointer-events: auto;
    cursor: default;
  }

  #mobile-indicator:hover {
    max-width: 190px;
    background: rgba(0, 0, 0, 0.74);
    opacity: .8;
  }

  #mobile-indicator:hover::after {
    content: " Viewing MOBILE Settings";
    font-size: 10px;
    letter-spacing: 0.05em;
  }
}

/* Mini lightbox: a simple in-page image viewer for desktop and mobile. */

.mini-lightbox[hidden] {
  display: none;
}

.mini-lightbox-trigger,
.mini-lightbox-card > img {
  cursor: zoom-in;
}

.mini-lightbox-trigger {
  overflow: hidden;
}

.mini-lightbox-trigger img,
.mini-lightbox-card > img {
  transition: filter 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.mini-lightbox-trigger:hover img,
.mini-lightbox-trigger:focus img,
.mini-lightbox-card > img:hover,
.mini-lightbox-card > img:focus {
  filter: brightness(1.07) contrast(1.04);
  transform: scale(1.012);
  box-shadow: 0 0 0 2px rgba(240, 160, 74, 0.45), 0 6px 16px rgba(0, 0, 0, 0.24);
}

.mini-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 54px 72px 34px;
  color: #e7fff6;
  background: rgba(0, 0, 0, 0.88);
}

.mini-lightbox-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1100px;
  max-height: 100%;
  margin: 0;
}

.mini-lightbox-image {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 150px);
  border: 2px solid #f0a04a;
  border-radius: 8px;
  background: #060606;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.62);
  object-fit: contain;
}

.mini-lightbox-caption {
  box-sizing: border-box;
  width: 100%;
  max-width: 920px;
  min-height: 1.4em;
  margin-top: 12px;
  color: #e7fff6;
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
}

.mini-lightbox button {
  border: 1px solid #f0a04a;
  color: #e7fff6;
  background: rgba(18, 60, 43, 0.88);
  font-family: inherit;
  font-weight: bold;
  cursor: pointer;
}

.mini-lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 8px 12px;
  border-radius: 999px;
}

.mini-lightbox-nav {
  position: absolute;
  top: 50%;
  width: 42px;
  height: 58px;
  margin-top: -29px;
  border-radius: 999px;
  font-size: 28px;
  line-height: 1;
}

.mini-lightbox-prev {
  left: 16px;
}

.mini-lightbox-next {
  right: 16px;
}

.mini-lightbox button:hover,
.mini-lightbox button:focus-visible {
  background: rgba(24, 94, 66, 0.98);
  outline: 2px solid #d8fff4;
}

@media (max-width: 760px) {
  .mini-lightbox {
    padding: 48px 12px 28px;
  }

  .mini-lightbox-image {
    max-height: calc(100vh - 138px);
    border-radius: 6px;
  }

  .mini-lightbox-caption {
    padding: 0 42px;
    font-size: 12px;
  }

  .mini-lightbox-nav {
    width: 36px;
    height: 36px;
    margin-top: -18px;
    font-size: 22px;
  }

  .mini-lightbox-prev {
    left: 12px;
  }

  .mini-lightbox-next {
    right: 12px;
  }
}
