:root {
  /* Add your CSS variables here if needed */
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow-x: hidden;
}

body {
  font-family: 'Chivo', Arial, Helvetica, sans-serif;
  background: #fff;
  color: #111;
  letter-spacing: 0.02em;
  scroll-behavior: smooth;
  line-height: 1.5;
}

.desktop-only { display: block; }
.mobile-only  { display: none !important; }

@media (max-width:1000px) {
  .desktop-only { display: none !important; }
  .mobile-only  { display: block !important; }
}

/* === DESKTOP SIDEBAR (STICKY HEADER & POSTER & NAV) */
@media (min-width:1001px) {
  .floating-poster {
    position: fixed;
    right: 0; top: 0;
    height: 100vh;
    max-height: 100vh;
    width: 33vw;

    display: flex;
    flex-direction: column;
    align-items: stretch;
    pointer-events: auto;
    z-index: 100;
    border-left: 1px solid #eee;
    background: #fff;
    overflow-y: auto !important;
    overflow-x: hidden;
    justify-content: flex-start;
    box-sizing: border-box;
  }
  .sidebar-header {
    width: 100%;
    position: sticky;
    top: 0; 
    background: #fff;
    z-index: 2;
    box-sizing: border-box;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
  }
  .desktop-title-group {
    width: 100%;
    background: #fff;
    padding: 0.7em 0.5em 0.5em 0.5em;
    box-sizing: border-box;
    border-bottom: 1px solid #eee;
  }
  .sidebar-title {
    font-size: 2.2em;
    font-weight: 900;
    color: #121c30;
    letter-spacing: 0.02em;
    line-height: 1.13;
    text-align: center;
    margin: 0.15em 0 0.13em 0;
    padding: 0;
    word-break: break-word;
  }
  .sidebar-subtitle {
    font-size: 1.13em;
    font-weight: 400;
    color: #3a4162;
    text-align: center;
    margin: 0 0 0.16em 0;
    padding: 0;
    word-break: break-word;
    width: 100%;
    box-sizing: border-box;
  }
  .poster-visual-wrap {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    min-height: 0;
    height: auto;
    margin: 0;
    padding: 0;
    flex-grow: 1;
    box-sizing: border-box;
  }
  #poster-float {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    height: auto;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    object-fit: contain;
    margin: 0;
    padding: 0;
    z-index: 1;
    max-height: 60vh;
    cursor: zoom-in;
    pointer-events: auto;
  }

  .floating-nav {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 0em;
    pointer-events: auto;
    margin: 0;
    box-sizing: border-box;
    max-width: 100%;
    padding: 0;
    min-height: 0px;
    flex-shrink: 0;
    align-self: stretch;
    margin-top: auto;
  }

  .floating-nav .wide-btn {
    all: unset;
    flex: 1 1 0;
    background: #111;
    color: #fff;
    cursor: pointer;
    padding: 1.2em 1.4em;
    border-radius: 10px;
    font-size: 1.15em;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 2px 10px #0001;
    letter-spacing: 0.03em;
    transition: background 0.12s;
    box-sizing: border-box;
    min-width: 0;
    margin: 0 0.3em;
    border: 3px solid #fff;
    min-height: 44px;
    min-width: 96px;
    max-width: 325px;
    word-break: break-word;
    overflow: hidden;
  }
  .floating-nav .wide-btn:hover, .floating-nav .wide-btn:focus {
    background: #232323;
    color: #fff;
  }
  .desktop-headshot-seam {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100vw;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    pointer-events: none;
    z-index: 9999;
    filter: none !important;
    background: transparent;
  }
  .desktop-headshot-seam img.floating-headshot {
    height: 50vh;
    border-radius: 0%;
    opacity: 1 !important;
    background: none !important;
    border: none !important;
    pointer-events: none;
    box-shadow: none !important;
    object-fit: cover;
    left: calc(55vw);
    bottom: 0;
    margin: 0;
    transition: left 0.2s;
    position: absolute;
  }
  .content-flex {
    margin-left: 0;
    margin-right: 33vw;
    padding: 4.1em 0 4.1em 0;
    min-width: 0;
    max-width: none;
    width: calc(100vw - 33vw);
    box-sizing: border-box;
  }
  .content-block {
    max-width: 880px;
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
    word-break: break-word;
    box-sizing: border-box;
    padding-left: 40px;
    padding-right: 40px;
  }
  .center-scroll-main h1, 
  .content-block h1 {
    display: none;
  }

  /* DESKTOP IMAGES IN CONTENT -- FIXED RESPONSIVE */
  .photo-single img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1.5px solid #e5e5e5;
    box-shadow: none;
    background: #fff;
    display: block;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  @media (max-width:1000px) {
    .desktop-headshot-seam img.floating-headshot {
      width: 190px;
      height: 190px;
      left: calc(67vw - 95px);
    }
    .floating-poster { min-width:160px;}
  }
  @media (max-width:1000px) {
    .floating-poster { min-width:100px;}
    .desktop-headshot-seam img.floating-headshot {
      width: 120px;
      height: 120px;
      left: calc(67vw - 60px);
    }
  }
}

/* ================ MOBILE ================== */
@media (max-width:1000px) {
  .floating-poster { display:none!important; }
  .desktop-headshot-seam { display: none !important; }
  .content-flex, .center-scroll-main { margin: 0 !important; padding: 0.9em 0 1.7em 0; width: 100vw; max-width: 100vw; min-width: 0; display: flex; flex-direction: column; box-sizing: border-box;}
  .content-block, .center-scroll-main > * {
    max-width: 100vw;
    box-sizing: border-box;
    padding-left: 8px;
    padding-right: 8px;
    word-break: break-word;
    margin-left: auto;
    margin-right: auto;
  }
  .poster-holder { 
    display: block !important;
    width:100vw;
    text-align: center;
    margin: 1.8em 0;
    box-sizing: border-box;
    padding: 0 8px;
  }
  .poster-holder img {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border-radius: 8px;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 3px 12px #0002;
    box-sizing: border-box;
    display: block;
  }
  .center-scroll-main h1, .content-block h1 {
    font-size: 1.4em;
    text-align: center;
    margin-top: 0.8em;
    padding-left: 0; padding-right: 0;
  }
  .center-scroll-main h2, .content-block h2 { font-size: 1.1em; }
  .center-scroll-main section, .content-block section { margin:2em 0; padding: 1.1em 2vw; }
  .photo-single img { 
    max-width: 96vw;
    border-radius: 6px;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block;
  }
  .fixed-nav-mobile {
    display: flex !important;
    position: fixed;
    bottom:0;
    left: 0;
    right: 0;
    width: 100vw;
    background: #fffdfaee;
    justify-content: space-between;
    align-items: stretch;
    gap: 0.6em;
    z-index: 200;
    padding: 0.5em 0.6em;
    box-shadow: 0 0 15px 3px #0002;
    border-top: 1px solid #eee;
    overflow-x: auto;
    box-sizing: border-box;
  }
  .fixed-nav-mobile button {
    flex: 1 1 auto;
    min-width: 0px;
    max-width: 95vw;
    box-sizing: border-box;
    font-size: 1.11em;
    background: #111; 
    color: #fff; 
    padding: 1.1em 0.9em ;
    border-radius: 10px; 
    font-family: inherit; 
    font-weight: bold; 
    border: 3px solid #fff;
    box-shadow: 0 2px 5px #1111;
    margin: 0 5px 1em;
    letter-spacing: .03em;
    white-space: nowrap;
  }
  .fixed-nav-mobile button:active { background: #323242; }

  .mobile-header-fixed {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    z-index: 205;
    background: #fffdfaee;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-radius: 0;
    box-shadow: 0 1px 9px 1px #0001, 0 2px 0 #eee;
    padding: 0; margin: 0;
    pointer-events: none;
  }
  .mobile-header-fixed h1 { pointer-events:auto; }
  .mobile-header-fixed .fact-warning { pointer-events:auto; }
  .mobile-header-fixed h1 {
    font-size: 2em;
    font-weight: 900;
    color: #121c30;
    margin-top: 0.2em;
    margin-bottom: 0.05em;
    line-height: 1.17em;
    width: 98vw;
    background: none;
    text-align: center;
    align-items: center;
    word-break: break-word;
  }
  .mobile-header-fixed .fact-warning {
    color: #D32F2F;
    background: #fff2f2;
    font-size: .75em;
    font-weight: 100;
    border-left: none;
    border-bottom: 2px solid #D32F2F;
    border-left: 0px;
    border-right: 0px;
    border-radius: 0;
    margin: 0;
    padding: 0 0 0 0;
    width: 100vw;
    text-align: center;
    letter-spacing: 0.01em;
    box-shadow: none;
    box-sizing: border-box;
  }
  .mobile-header-spacer {
    display: block;
    width: 100vw;
    min-height: 70px;
    height: auto;
    margin: 0; padding: 0;
  }
  .floating-warning-desktop { display: none !important; }
}

/******* HEADSHOT SECTION CHANGES FOR MOBILE ********/
.section-mobile-headshot {
  display: none;
  text-align: center;
  margin: 0 !important;
  padding: 0 !important;
  width: 100vw;
  height: 100vh;
  position: relative;
  background: #fff;
}
.section-mobile-headshot img {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  min-width: 100vw;
  min-height: 100vh;
  object-fit: contain;
  display: block;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
  box-shadow: none !important;
  position: absolute;
  top: 0; left: 0;
}
/* Make sure this overrides previous rules */
@media (max-width:1000px) {
  .section-mobile-headshot { display: block !important; }
}
@media (min-width:1001px) {
  .section-mobile-headshot { display: none !important; }
}
.fixed-nav-mobile {
  display: none;
}

.scrolling-warning {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  background: #fff2f2;
  border-top: 2px solid #D32F2F;
  border-bottom: 2px solid #D32F2F;
  border-left: 0px;
  border-right: 0px;
  color: #D32F2F;
  width: 100%;
  font-size: 1em;
  padding: 0.7em 0;
  box-sizing: border-box;
}

.scrolling-warning-text {
  display: inline-block;
  padding-left: 100vw; 
  animation: scrolling-warning-marquee 44s linear infinite;
  font-weight: 700; 
  white-space: nowrap; 
  font-size: inherit;
}

@keyframes scrolling-warning-marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.scrolling-warning-text {
  min-width: 100vw;
}

section pre {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
  font-size: 1.08em;
  line-height: 1.5;
}

/* === Key fix for diary and all pre blocks in content === */
.content-block pre {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.subtitle-mobile {
  font-size: 1em;
  font-weight: 400;
  color: #3a4162;
  margin-top: 0.1em;
  margin-bottom: 0.45em;
  padding-left: 0.2em;
  padding-right: 0.2em;
  word-break: break-word;
}
@media (min-width:1001px) {
  .subtitle-mobile { display: none !important; }
}

.poster-lightbox-overlay {
  position: fixed; z-index: 3000; left: 0; top: 0; width: 100vw; height: 100vh;
  background: rgba(20,20,25,0.94);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.18s;
}
.poster-lightbox-overlay img {
  max-width: 92vw; max-height: 80vh; border-radius: 13px;
  box-shadow: 0 0 38px 7px #21213a;
  background: #222;
  object-fit: contain;
  border: 1.7px solid #fff1;
  display: block;
}
.close-lightbox-btn {
  position: absolute; top: 3vh; right: 4vw;
  background: #222b; color: #fafafc; border: none;
  font-size: 2.6em; font-weight: 700; line-height: 1em;
  cursor: pointer; border-radius: 50%; padding: 0 0.24em; width: 1.4em; height: 1.4em;
  box-shadow: 0 0 7px #0007;
  transition: background 0.18s;
  z-index: 3001;
}
.close-lightbox-btn:hover, .close-lightbox-btn:focus {
  background: #444e;
  color: #fff;
}
@media (max-width: 1000px) {
  .poster-lightbox-overlay img { max-width: 98vw; max-height: 65vh; border-radius: 9px;}
  .close-lightbox-btn { right: 3vw; top: 1.8vh; font-size: 2em;}
}

@media (min-width: 1001px) {
  .content-flex {
    display: flex;
    flex-direction: column;
    margin-left: 0;
    margin-right: 33vw;
    padding: 4.1em 0 4.1em 0;
    min-width: 0;
    max-width: none;
    width: calc(100vw - 33vw);
    box-sizing: border-box;
  }
  .content-block {
    max-width: 2000px;
    min-width: 0;
    margin-left:auto;
    margin-right:auto;
    word-break: break-word;
    box-sizing: border-box;
    padding-left: 40px;
    padding-right: 40px;
  }
}

.welcome-overlay {
  position: fixed;
  z-index: 9998;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(12,13,32,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw; height: 100vh;
  flex-direction: column;
  color: #fff;
  transition: opacity 0.3s;
}
.welcome-content {
  background: #212245ee;
  border-radius: 18px;
  box-shadow: 0 8px 25px #0005;
  padding: 2.5em 2.7em;
  text-align: center;
  max-width: 90vw;
}
.welcome-content h1 {
  margin-bottom: 0.7em;
  font-size: 2.1em;
  font-weight: 900;
  color: #f0e;
  letter-spacing: 0.03em;
}
.welcome-content p {
  font-size: 1.22em;
  margin-bottom: 1.3em;
  color: #e6e7f2;
  line-height: 1.42;
}
.welcome-content button {
  background: #f0e;
  color: #101015;
  border: none;
  border-radius: 9px;
  font-size: 1.12em;
  font-weight: 700;
  padding: 0.95em 2.25em;
  cursor: pointer;
  box-shadow: 0 2px 12px #0004;
  transition: background 0.13s;
}
.welcome-content button:hover,
.welcome-content button:focus {
  background: #9f5dca;
  color: #fff;
  outline: 2px solid #e0e;
}

.welcome-overlay-bw {
  background: #fff !important;
  color: #111 !important;
  min-height: 100vh;
  align-items: flex-start;
  justify-content: flex-start;
  border: none;
  padding: 0;
}

.welcome1-flex {
  display: flex;
  flex-direction: row;
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
}

.welcome1-header {
  width: 33vw;
  min-width: 200px;
  max-width: 420px;
  background: #f8f8fa;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1.5px solid #efefef;
  box-sizing: border-box;
  padding: 0 3vw;
}
.welcome1-header h1 {
  font-size: 2.5em;
  font-weight: 900;
  color: #111;
  line-height: 1.1;
  text-align: center;
  margin: 0;
  word-break: break-word;
}
.welcome1-header .byline {
  display: block;
  font-size: 0.5em;
  color: #555;
  font-weight: 400;
  margin-top: 0.15em;
  letter-spacing: 0.05em;
}

.welcome1-main {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 20vw 0 5vw;
  box-sizing: border-box;
  max-width: 67vw;
  width: 100%;
}
.welcome1-main p {
  font-size: 1.35em;
  max-width: 700px;
  color: #232323;
  margin-bottom: 2.1em;
  margin-top: 0;
  line-height: 1.42;
  font-weight: 400;
  letter-spacing: 0.01em;
}
.welcome1-continue-btn {
  background: #111;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1.13em;
  font-weight: 700;
  padding: 1em 2.2em;
  cursor: pointer;
  box-shadow: 0 2px 14px #3332;
  transition: background 0.19s, color 0.15s;
}
.welcome1-continue-btn:hover, .welcome1-continue-btn:focus {
  background: #333;
  color: #fff;
  outline: 2px solid #222;
}

/* MOBILE: stack vertically */
@media (max-width: 1000px) {
  .welcome1-flex {
    flex-direction: column;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
  }
  .welcome1-header {
    width: 100vw;
    max-width: none;
    min-width: 0;
    border-right: none;
    border-bottom: 1.5px solid #efefef;
    padding: 7vw 7vw 2vw 7vw;
    align-items: center;
    justify-content: center;
    text-align: center;
    display: flex;
  }
  .welcome1-header h1 {
    font-size: 2em;
    text-align: center;
    width: 100%;
  }
  .welcome1-main {
    padding: 8vw 7vw 0 7vw;
    max-width: 100vw;
    width: 100vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
  }
  .welcome1-main p {
    font-size: 1.09em;
    max-width: 520px;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }
  .welcome1-continue-btn {
    display: inline-block;
    margin-top: 1.6em;
    width: auto;
    min-width: 44vw;
    text-align: center;
  }
}

.welcome-overlay-redblkylw .welcome-content {
  background: rgba(0, 0, 0, 0.56);
  border-radius: 1.2em;
  box-shadow: 0 8px 30px #2226;
  padding: 2.2em 2.3em 2em 2.3em;
  text-align: center;
  max-width: 500px;
  width: 92vw;
  color: #fff;
  border: none;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
@media (max-width: 600px) {
  .welcome-overlay-redblkylw .welcome-content {
    max-width: 97vw;
    padding: 1.2em 0.6em 1.4em 0.6em;
  }
}
.welcome-overlay-redblkylw .welcome-content h1 {
  color: #ffc800;
  text-shadow: 2px 2px 0 #000, 0 2px 12px #410;
  font-size: 2.3em;
  font-weight: 900;
  margin-top: 0.1em;
  margin-bottom: 0.8em;
  letter-spacing: 0.05em;
}
.welcome-overlay-redblkylw .welcome-content p {
  font-size: 1.23em;
  margin-bottom: 2em;
  color: #fffbea;
  font-weight: 500;
  line-height: 1.45;
  text-shadow: 0 1px 8px #0003;
}
.welcome-overlay-redblkylw .welcome2-continue-btn {
  background: #de1e34 !important;
  color: #ffc800 !important;
  border: none;
  border-radius: 11px;
  font-size: 1.12em;
  font-weight: 700;
  padding: 1em 2.1em;
  cursor: pointer;
  box-shadow: 0 1.5px 11px #0005;
  transition: background 0.18s, color 0.16s;
  letter-spacing: 0.04em;
  outline: none;
}
.welcome-overlay-redblkylw .welcome2-continue-btn:hover,
.welcome-overlay-redblkylw .welcome2-continue-btn:focus {
  background: #000 !important;
  color: #ffc800 !important;
  outline: 2px solid #ffc800;
}

  body {
  line-height: 1.6;
}

  pre {
  line-height: 1.6;
}

.loading-overlay {
  position: fixed;
  z-index: 9998;
  left: 0; top: 0; right: 0; bottom: 0;
  background: #14191b; /* Opaque background */
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  pointer-events: all;
}
.am-spinner {
  display: block;
  margin: 0 auto 1.3em auto;
}
.am-spinner .rainbow-flash path {
  stroke-width: 1; /* big and bold for big image */
   stroke-linecap: butt; /* Flat line ends */
  fill: none;
  stroke-dasharray: 44;
  stroke-dashoffset: 0;
  animation: snake-dash 0.7s linear infinite, color-rainbow 1.5s linear infinite;
}

@keyframes color-rainbow {
  0%   { stroke: #f00; }
  12%  { stroke: #ff0; }
  25%  { stroke: #0f0; }
  37%  { stroke: #0ff; }
  50%  { stroke: #00f; }
  62%  { stroke: #90f; }
  75%  { stroke: #f0f; }
  87%  { stroke: #f00; }
  100% { stroke: #f00; }
}
@keyframes snake-dash {
  0%     { stroke-dashoffset: 44;}
  100%   { stroke-dashoffset: 0;}
}
.loading-label {
  color: #fff;
  font-size: 1.3em;
  letter-spacing: 0.08em;
  font-weight: 700;
  text-shadow: 0 2px 16px #0146;
}
