:root {
  --ink: #0B2092;
  --muted: rgba(11, 32, 146, 0.68);
  --paper: #FFFFFF;
  --panel: #FFFFFF;
  --jeopardy-blue: #0B2092;
  --jeopardy-blue-2: #1632b6;
  --gold: #EA9E4B;
  --warm: #EA9E4B;
  --sage: #0B2092;
  --line: rgba(11, 32, 146, 0.14);
  --shadow: 0 24px 70px rgba(11, 32, 146, 0.16);
  --font-body: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-game: "Changa One", Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
}

body.is-lightbox-open {
  overflow: hidden;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  background: var(--ink);
  color: #FFFFFF;
  padding: 0.7rem 1rem;
  border-radius: 6px;
}

.skip-link:focus {
  top: 1rem;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  width: 260px;
  padding: 1.5rem;
  background: var(--jeopardy-blue);
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.brand-mark {
  width: 54px;
  height: 54px;
  display: block;
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.84rem;
}

.section-nav {
  display: grid;
  gap: 0.45rem;
}

.section-nav a,
.mobile-nav a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.84);
  padding: 0.72rem 0.8rem;
  border-radius: 6px;
  min-height: 48px;
  display: flex;
  align-items: center;
  position: relative;
}

.section-nav a:hover,
.section-nav a:focus-visible,
.section-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a:focus-visible,
.mobile-nav a.is-active {
  color: white;
  background: rgba(234, 158, 75, 0.22);
  outline: none;
}

.section-nav a.is-active,
.mobile-nav a.is-active {
  box-shadow: inset 3px 0 0 var(--gold);
}

.nav-default,
.nav-question {
  transition: opacity 180ms ease, transform 180ms ease;
}

.nav-question {
  position: absolute;
  opacity: 0;
  transform: translateY(0.35rem);
}

.section-nav a:hover .nav-default,
.section-nav a:focus-visible .nav-default,
.section-nav a.is-active .nav-default,
.mobile-nav a:hover .nav-default,
.mobile-nav a:focus-visible .nav-default,
.mobile-nav a.is-active .nav-default {
  opacity: 0;
  transform: translateY(-0.35rem);
}

.section-nav a:hover .nav-question,
.section-nav a:focus-visible .nav-question,
.section-nav a.is-active .nav-question,
.mobile-nav a:hover .nav-question,
.mobile-nav a:focus-visible .nav-question,
.mobile-nav a.is-active .nav-question {
  opacity: 1;
  transform: translateY(0);
}

.sidebar-note {
  margin-top: auto;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.note-label {
  display: inline-block;
  color: var(--gold);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.sidebar-note p {
  margin: 0.45rem 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
}

main {
  margin-left: 260px;
  min-height: 100vh;
}

.hero {
  min-height: 88vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.78fr);
  align-items: center;
  gap: 3rem;
  padding: clamp(2rem, 5vw, 5rem);
  background:
    radial-gradient(circle at 82% 24%, rgba(234, 158, 75, 0.2), transparent 30%),
    linear-gradient(135deg, #FFFFFF 0%, #fff8f1 50%, #eef2ff 100%);
}

.hero-copy {
  max-width: 790px;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--warm);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0;
}

.obituary-eyebrow {
  font-size: 1rem;
  font-weight: 900;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

.nowrap {
  white-space: nowrap;
}

h1 {
  max-width: 850px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 6.2rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-subtitle {
  margin: 1.1rem 0 0;
  color: var(--jeopardy-blue);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 750;
}

.hero-subtitle span {
  display: block;
}

.hero-subtitle span + span {
  white-space: nowrap;
}

.hero-intro {
  max-width: 650px;
  margin: 1.4rem 0 0;
  color: rgba(11, 32, 146, 0.78);
  font-size: 1.12rem;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 2rem;
}

.share-actions button,
form button,
.return-link {
  border: 0;
  border-radius: 6px;
  background: var(--ink);
  color: #FFFFFF;
  padding: 0.82rem 1rem;
  font-weight: 750;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.share-actions button:nth-child(1) {
  background: var(--jeopardy-blue);
}

.share-actions button:nth-child(2) {
  background: var(--gold);
  color: var(--jeopardy-blue);
}

.share-actions button:nth-child(3) {
  background: #FFFFFF;
  color: var(--jeopardy-blue);
  box-shadow: inset 0 0 0 2px var(--jeopardy-blue);
}

.share-actions button:hover,
form button:hover,
.return-link:hover {
  transform: translateY(-1px);
}

.share-status {
  min-height: 1.5rem;
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-board-wrap {
  display: grid;
  gap: 1.15rem;
  justify-items: center;
}

.hero-portrait {
  width: min(260px, 70%);
  margin: 0;
  padding: 0.5rem;
  border: 3px solid var(--gold);
  border-radius: 8px;
  background: var(--jeopardy-blue);
  box-shadow: 0 18px 46px rgba(11, 32, 146, 0.14);
  transform: none;
}

.hero-portrait img {
  width: 100%;
  display: block;
  border-radius: 6px;
}

.hero-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 0.45rem;
  padding: 0.45rem;
  background: var(--jeopardy-blue);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transform: none;
}

.board-caption {
  margin: 0;
  color: var(--jeopardy-blue);
  font-family: var(--font-game);
  font-size: clamp(1.4rem, 3vw, 2.15rem);
  text-align: center;
  text-decoration: none;
  transform: none;
  text-shadow: 0 2px 0 rgba(234, 158, 75, 0.22);
}

.board-caption:hover,
.board-caption:focus-visible {
  color: var(--gold);
  outline: none;
}

.board-category,
.board-tile {
  min-height: 84px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 4px;
  padding: 0.65rem;
  background: linear-gradient(180deg, var(--jeopardy-blue-2), var(--jeopardy-blue));
  color: var(--gold);
  font-family: var(--font-game);
  font-weight: 900;
}

.board-category {
  min-height: 54px;
  color: #FFFFFF;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.board-tile {
  font-size: clamp(1.3rem, 3vw, 2.1rem);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}

.board-answer {
  color: #FFFFFF;
  font-size: clamp(0.95rem, 2vw, 1.35rem);
  line-height: 1.1;
}

.photo-strip,
.content-section {
  padding: clamp(2rem, 5vw, 4.5rem);
}

.photo-strip {
  display: grid;
  grid-template-columns: minmax(300px, 1.05fr) minmax(300px, 1.05fr) minmax(260px, 0.95fr);
  gap: 1.2rem;
  align-items: start;
  justify-items: center;
  background: var(--jeopardy-blue);
}

.feature-photo {
  position: relative;
  min-width: 0;
  width: 100%;
  max-width: 620px;
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--jeopardy-blue);
  color: #FFFFFF;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
}

.feature-photo.carousel-clone {
  display: none;
}

.feature-photo.large {
  min-height: 0;
}

.feature-photo img {
  width: 100%;
  display: block;
  height: auto;
}

.content-section {
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(180px, 0.35fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 1.5rem;
}

.section-kicker {
  grid-column: 2;
  margin: -0.75rem 0 0;
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 700;
}

h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
}

.story-panel,
.notice-panel,
.submission-area,
.memory-message-panel,
.video-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(11, 32, 146, 0.08);
}

.story-panel {
  padding: clamp(1.5rem, 3vw, 2.4rem);
  font-size: 1.08rem;
}

.story-panel p {
  max-width: 850px;
  margin: 0;
}

.story-panel p + p {
  margin-top: 1rem;
}

.notice-panel {
  padding: 1.5rem;
  border-left: 6px solid var(--gold);
  font-size: 1.1rem;
}

.notice-panel p {
  margin: 0;
}

.memory-collage {
  columns: 220px;
  column-gap: 0.8rem;
}

.memory-photo {
  display: inline-block;
  width: 100%;
  margin: 0 0 0.8rem;
  overflow: hidden;
  border: 1px solid rgba(11, 32, 146, 0.18);
  border-radius: 8px;
  background: var(--jeopardy-blue);
  box-shadow: 0 14px 34px rgba(11, 32, 146, 0.1);
  break-inside: avoid;
}

.memory-photo[hidden] {
  display: none;
}

.memory-photo.feature {
}

.memory-photo.wide {
}

.memory-photo.tall {
}

.memory-photo a,
.memory-photo img {
  display: block;
  width: 100%;
}

.memory-photo a {
  color: inherit;
  cursor: zoom-in;
}

.memory-photo img {
  height: auto;
  transition: transform 240ms ease, filter 240ms ease;
}

.memory-photo:hover img,
.memory-photo:focus-within img {
  transform: scale(1.035);
  filter: saturate(1.04) contrast(1.02);
}

.load-more-photos {
  display: none;
  margin: 1rem auto 0;
  border: 0;
  border-radius: 6px;
  background: var(--gold);
  color: var(--jeopardy-blue);
  padding: 0.78rem 1.1rem;
  font-weight: 850;
  cursor: pointer;
}

.load-more-photos:hover,
.load-more-photos:focus-visible {
  transform: translateY(-1px);
  outline: 2px solid rgba(11, 32, 146, 0.22);
  outline-offset: 2px;
}

.contributed-photos-section {
  margin-top: clamp(1.6rem, 4vw, 2.6rem);
  padding-top: clamp(1.2rem, 3vw, 2rem);
  border-top: 1px solid rgba(11, 32, 146, 0.16);
}

.contributed-photos-section h3 {
  margin: 0;
  color: var(--jeopardy-blue);
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1;
}

.contributed-empty {
  margin: 0.65rem 0 0;
  color: var(--muted);
}

.contributed-empty[hidden] {
  display: none;
}

.contributed-photo-grid {
  columns: 220px;
  column-gap: 0.8rem;
  margin-top: 1rem;
}

.contributed-photo {
  position: relative;
}

.photo-remove-button {
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(11, 32, 146, 0.9);
  color: #FFFFFF;
  padding: 0.32rem 0.62rem;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
}

.photo-remove-button:hover,
.photo-remove-button:focus-visible {
  background: var(--gold);
  color: var(--jeopardy-blue);
  outline: none;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 2rem);
  background: rgba(4, 12, 60, 0.9);
}

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

.photo-lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 4rem);
  justify-self: center;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.lightbox-close,
.lightbox-nav {
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--jeopardy-blue);
  color: #FFFFFF;
  cursor: pointer;
  font-family: var(--font-game);
  line-height: 1;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  font-size: 1.6rem;
}

.lightbox-nav {
  width: 48px;
  height: 48px;
  font-size: 1.35rem;
}

.lightbox-close:hover,
.lightbox-close:focus-visible,
.lightbox-nav:hover,
.lightbox-nav:focus-visible {
  background: var(--gold);
  color: var(--jeopardy-blue);
  outline: none;
}

.submission-area {
  margin-top: 1rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(280px, 1fr);
  gap: 2rem;
}

.submission-area h3 {
  margin: 0 0 0.5rem;
  font-size: 1.55rem;
}

.submission-area p {
  color: var(--muted);
  margin: 0;
}

form {
  display: grid;
  gap: 0.9rem;
}

label {
  display: grid;
  gap: 0.38rem;
  color: var(--jeopardy-blue);
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.75rem 0.8rem;
  background: #FFFFFF;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.hidden-field {
  display: none;
}

form button {
  justify-self: start;
  background: var(--jeopardy-blue);
}

form button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.timeline-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.timeline-list li {
  position: relative;
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding: 0 0 1.6rem 2.1rem;
  background: #FFFFFF;
}

.timeline-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32rem;
  width: 0.78rem;
  height: 0.78rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(234, 158, 75, 0.18);
}

.timeline-list li::after {
  content: "";
  position: absolute;
  left: 0.36rem;
  top: 1.45rem;
  bottom: 0.2rem;
  width: 2px;
  background: rgba(11, 32, 146, 0.2);
}

.timeline-list li:last-child {
  padding-bottom: 0;
}

.timeline-list li:last-child::after {
  display: none;
}

.timeline-list time {
  color: var(--jeopardy-blue);
  font-weight: 900;
}

.memory-message-panel {
  padding: clamp(1.25rem, 3vw, 2rem);
  display: grid;
  grid-template-columns: minmax(240px, 0.65fr) minmax(280px, 1fr);
  column-gap: 2rem;
  row-gap: 1.25rem;
}

.memory-message-panel h3 {
  margin: 0 0 0.5rem;
  font-size: 1.55rem;
}

.memory-message-panel p {
  color: var(--muted);
  margin: 0;
}

.form-status {
  min-height: 1.35rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.memory-message-list {
  grid-column: 1 / -1;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.memory-message-list li {
  padding: 1.1rem 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
}

.memory-message-list strong,
.memory-message-list small {
  display: block;
}

.memory-message-list strong {
  color: var(--jeopardy-blue);
  font-size: clamp(1.18rem, 2vw, 1.45rem);
  line-height: 1.1;
}

.memory-message-list small {
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.memory-message-list p {
  max-width: none;
  margin-top: 0.7rem;
  color: var(--ink);
  font-size: clamp(1.02rem, 1.8vw, 1.18rem);
  line-height: 1.42;
}

.memory-remove-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #FFFFFF;
  color: var(--muted);
  padding: 0.32rem 0.65rem;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
}

.memory-remove-button:hover,
.memory-remove-button:focus-visible {
  color: var(--jeopardy-blue);
  border-color: rgba(11, 32, 146, 0.36);
  outline: none;
}

.final-tribute {
  padding-bottom: clamp(3rem, 7vw, 6rem);
}

.video-panel {
  overflow: hidden;
  background: var(--jeopardy-blue);
}

.video-panel video {
  width: 100%;
  display: block;
  background: #000000;
}

.tribute-message {
  margin: 1.4rem 0 0;
  color: var(--jeopardy-blue);
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.05;
  text-align: center;
}

.site-credit {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-align: center;
}

.menu-toggle,
.mobile-nav {
  display: none;
}

.thank-you-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 75% 20%, rgba(234, 158, 75, 0.24), transparent 28%),
    var(--paper);
}

.thank-you {
  width: min(680px, calc(100% - 2rem));
  padding: clamp(1.5rem, 4vw, 3rem);
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.thank-you h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
}

.thank-you p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.1rem;
}

@media (max-width: 980px) {
  .sidebar {
    display: none;
  }

  main {
    margin-left: 0;
  }

  .menu-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 12;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 8px;
    background: var(--jeopardy-blue);
    display: grid;
    place-content: center;
    gap: 5px;
    cursor: pointer;
  }

  .menu-toggle span {
    width: 22px;
    height: 2px;
    background: #FFFFFF;
  }

  .mobile-nav {
    position: fixed;
    top: 4.5rem;
    right: 1rem;
    z-index: 12;
    width: min(260px, calc(100vw - 2rem));
    padding: 0.5rem;
    border-radius: 8px;
    background: var(--jeopardy-blue);
    box-shadow: var(--shadow);
  }

  .mobile-nav:not([hidden]) {
    display: grid;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 5rem;
    gap: 2rem;
  }

  .hero-board {
    transform: none;
  }

  .photo-strip,
  .submission-area,
  .section-heading,
  .memory-message-panel {
    grid-template-columns: 1fr;
  }

  .section-kicker {
    grid-column: 1;
    margin-top: -0.5rem;
  }

  .memory-collage {
    columns: 2;
  }

  .memory-message-list {
    grid-column: 1;
  }

  .memory-message-list li {
    grid-template-columns: 1fr;
  }

  .memory-remove-button {
    justify-self: start;
  }
}

@media (max-width: 620px) {
  .hero,
  .photo-strip,
  .content-section {
    padding-inline: 1rem;
  }

  h1 {
    font-size: clamp(2.55rem, 15vw, 4rem);
  }

  .hero-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.32rem;
    padding: 0.32rem;
  }

  .board-category {
    min-height: 48px;
    font-size: 0.7rem;
  }

  .board-tile {
    min-height: 74px;
    font-size: 1.25rem;
  }

  .board-answer {
    font-size: 0.82rem;
  }

  .share-actions button {
    flex: 1 1 150px;
  }

  .photo-strip {
    display: flex;
    gap: 0.85rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 1rem;
    -webkit-overflow-scrolling: touch;
  }

  .photo-strip::-webkit-scrollbar {
    display: none;
  }

  .feature-photo,
  .feature-photo.large {
    display: block;
    flex: 0 0 min(84vw, 420px);
    min-height: 0;
    max-width: none;
    scroll-snap-align: center;
  }

  .feature-photo.carousel-clone {
    display: block;
  }

  .memory-collage {
    columns: 2;
    column-gap: 0.55rem;
  }

  .contributed-photo-grid {
    columns: 2;
    column-gap: 0.55rem;
  }

  .load-more-photos:not([hidden]) {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .memory-photo,
  .memory-photo.feature,
  .memory-photo.wide,
  .memory-photo.tall {
    width: 100%;
    margin-bottom: 0.55rem;
  }

  .timeline-list li {
    grid-template-columns: 1fr;
  }
}
