:root {
  --ink: #606060;
  --heading: #5b6878;
  --faint: #aebbd1;
  --line: #d9dde5;
  --paper: #ffffff;
  --cream: #fff0c7;
  --soft: #f1f1f1;
  --top: 224px;
  --sans: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --article-font: var(--sans);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: linear-gradient(#f2f2f2 0, #f2f2f2 360px, var(--cream) 100%);
  font-family: var(--sans);
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.site-header {
  min-height: var(--top);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-rows: 132px 54px;
  align-items: end;
}

.site-title {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--heading);
  font-size: clamp(42px, 4.1vw, 68px);
  font-weight: 300;
  letter-spacing: 4px;
  justify-self: center;
  padding: 0 20px 20px;
  text-transform: uppercase;
}

.site-title:hover {
  color: #3f4c5b;
}

.site-nav {
  align-self: stretch;
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  min-width: min(900px, 92vw);
  max-width: calc(100vw - 260px);
  position: relative;
}

.nav-link,
.menu-command,
.text-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--faint);
  padding: 10px 0;
  font-size: 18px;
  font-weight: 300;
  text-decoration: none;
}

.nav-link:hover,
.nav-link.active,
.menu-command:hover,
.menu-item.menu-open > .menu-command,
.menu-item:focus-within > .menu-command,
.menu-item:hover > .menu-command,
.text-link:hover {
  color: #4f5e70;
}

.nav-group {
  position: relative;
  height: 54px;
  display: grid;
  align-items: center;
}

.cascade-menu {
  position: fixed;
  top: var(--top);
  left: 16px;
  display: none;
  z-index: 80;
}

.nav-group:hover .cascade-menu,
.nav-group:focus-within .cascade-menu,
.nav-group.menu-open .cascade-menu {
  display: block;
}

.menu-level {
  width: 330px;
  background: rgba(255, 255, 255, 0.98);
  border-right: 1px solid var(--line);
  box-shadow: 0 18px 42px rgba(69, 78, 92, 0.06);
  overflow: visible;
}

.root-menu {
  width: 480px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 42px rgba(69, 78, 92, 0.12);
}

.menu-command {
  display: block;
  width: 100%;
  text-align: left;
  line-height: 1.35;
  font-size: 26px;
  padding: 10px 22px;
  white-space: nowrap;
}

.menu-command:hover,
.menu-item.menu-open > .menu-command,
.menu-item:hover > .menu-command,
.menu-item:focus-within > .menu-command {
  background: #f6f6f6;
}

.root-menu > .menu-item.menu-open > .menu-command,
.root-menu > .menu-item:hover > .menu-command,
.root-menu > .menu-item:focus-within > .menu-command {
  outline: 2px solid #111;
  outline-offset: -2px;
  color: #4f5e70;
}

.menu-item {
  position: relative;
}

.submenu {
  position: absolute;
  left: 100%;
  top: 0;
  display: none;
  min-height: 100%;
  border-left: 1px solid var(--line);
}

.menu-item:hover > .submenu,
.menu-item:focus-within > .submenu,
.menu-item.menu-open > .submenu {
  display: block;
}

.year-menu {
  width: 330px;
}

.year-menu .menu-command {
  font-size: 24px;
  padding-top: 11px;
  padding-bottom: 11px;
}

.browse-page {
  width: min(1400px, calc(100vw - 64px));
  margin: 0 auto;
  padding: 72px 0 96px;
}

.browse-page .collection-intro,
.about-section,
.museum-highlights,
.custom-page,
.recent-list {
  font-family: var(--article-font);
}

.browse-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  margin: 34px auto 42px;
  border: 1px solid #d9dde5;
  background: rgba(255, 255, 255, 0.7);
}

.browse-section {
  min-height: 280px;
  border-right: 1px solid #d9dde5;
}

.browse-section h2 {
  margin: 0;
  padding: 10px 18px;
  text-align: center;
  color: #4f5e70;
  background: #f5f7fb;
  font-size: 30px;
  line-height: 1.1;
}

.browse-specialty {
  grid-row: span 2;
  border-right: 0;
}

.browse-movie {
  border-top: 1px solid #d9dde5;
}

.browse-link-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 10px 18px 18px;
}

.browse-link {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: #6d7d91;
  text-align: left;
  font-size: 24px;
  line-height: 1.18;
  padding: 3px 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.browse-link:hover {
  color: #3f4c5b;
  background: rgba(245, 247, 251, 0.8);
}

.browse-samples {
  text-align: center;
  margin-top: 28px;
}

.page-image-gallery {
  margin: 34px auto 48px;
}

.page-image-gallery h2 {
  margin: 0 0 18px;
  color: #666;
  text-align: center;
  font-size: 24px;
}

.page-image-gallery > div {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.page-image-card {
  margin: 0;
  color: #5d6875;
  text-align: center;
}

.page-image-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #ddd;
  margin-bottom: 8px;
}

.page-image-card figcaption {
  font-size: 15px;
  line-height: 1.35;
}

.browse-samples h2 {
  color: #666;
}

.browse-samples > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.browse-photo {
  border: 0;
  background: transparent;
  color: #5d6875;
  padding: 0;
}

.browse-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin-bottom: 8px;
}

.recent-page {
  min-height: calc(100vh - var(--top));
  background: #0d4f45;
  color: #f4fff8;
  padding: 26px 0 80px;
  font-family: Arial, Helvetica, sans-serif;
}

.recent-wrap {
  width: min(1280px, calc(100vw - 120px));
  margin: 0 auto;
}

.recent-banner {
  width: min(880px, 100%);
  margin: 0 auto 26px;
  background: #000;
  color: #fff;
  text-align: center;
}

.recent-logo-row {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: linear-gradient(90deg, #000, #06440d 50%, #02a514);
  font-size: clamp(30px, 3vw, 46px);
  font-weight: 900;
  text-shadow: 2px 2px 0 #000;
}

.toy-icon {
  color: #f4b62d;
  font-size: 42px;
}

.toy-icon.plane {
  color: #e7f1ff;
}

.recent-banner nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 8px 12px 0;
}

.recent-banner button,
.recent-link,
.recent-back,
.recent-photo-link {
  border: 0;
  background: transparent;
  color: #ffff00;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 700;
  padding: 0;
}

.recent-banner h1 {
  margin: 2px 0 0;
  padding: 0 0 4px;
  font-size: 24px;
  color: #fff;
}

.recent-back {
  display: block;
  margin: 24px auto 72px;
  font-size: 20px;
}

.recent-list {
  font-size: clamp(20px, 1.55vw, 28px);
  font-weight: 700;
  line-height: 1.55;
}

.recent-row {
  margin: 16px 0;
}

.recent-count {
  border: 0;
  background: transparent;
  color: #ff1414;
  font: inherit;
  font-weight: 900;
  padding: 0;
}

.recent-detail {
  color: rgba(244, 255, 248, 0.9);
}

.recent-photo-link {
  font: inherit;
  color: #fff9b0;
}

.custom-page {
  width: min(1280px, calc(100vw - 64px));
  margin: 0 auto;
  padding: 82px 0 110px;
}

.utility-actions {
  position: absolute;
  right: 28px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.utility-button,
.soft-button,
.solid-button,
.ghost-button,
.danger-button {
  border: 1px solid var(--line);
  background: #fff;
  color: #586777;
  border-radius: 2px;
  padding: 8px 12px;
  font-size: 14px;
}

.utility-button:hover,
.soft-button:hover,
.ghost-button:hover {
  background: #f5f7fb;
}

.stage {
  min-height: calc(100vh - var(--top));
}

.home-page,
.collection-page {
  width: min(1280px, calc(100vw - 64px));
  margin: 0 auto;
}

.home-page {
  padding: 54px 0 90px;
  width: min(1500px, calc(100vw - 120px));
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(300px, 520px) minmax(420px, 1fr);
  gap: clamp(72px, 10vw, 150px);
  align-items: center;
  width: min(980px, 100%);
  margin: 0 auto 118px;
}

.profile-portrait {
  margin: 0;
  justify-self: center;
  width: clamp(280px, 30vw, 430px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  background: #d9dde5;
  filter: grayscale(1);
}

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

.profile-summary h1 {
  margin: 0 0 34px;
  color: #111;
  font-size: clamp(56px, 6vw, 78px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0;
}

.profile-role {
  margin: 8px 0;
  color: var(--heading);
  font-size: clamp(26px, 2.2vw, 34px);
  line-height: 1.35;
  font-weight: 600;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 46px;
  color: #111;
  font-size: 26px;
}

.profile-links button {
  border: 0;
  background: transparent;
  color: #075a78;
  padding: 0;
  font-size: inherit;
  font-weight: 600;
}

.profile-links button:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.about-section {
  color: var(--heading);
  font-size: clamp(24px, 1.85vw, 32px);
  line-height: 1.48;
}

.about-section h2,
.museum-highlights h2 {
  margin: 0 0 22px;
  color: var(--heading);
  font-size: clamp(48px, 4.4vw, 62px);
  line-height: 1.08;
  font-weight: 500;
}

.about-section p {
  margin: 0 0 36px;
}

.museum-highlights {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(520px, 1.2fr);
  gap: 46px;
  align-items: start;
  color: var(--heading);
  font-size: 22px;
  line-height: 1.65;
}

.welcome-band {
  display: grid;
  grid-template-columns: 250px minmax(360px, 1fr) 320px;
  gap: clamp(54px, 8vw, 120px);
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.home-image {
  margin: 0;
  justify-self: center;
}

.home-image img {
  display: block;
  width: 100%;
  object-fit: cover;
}

.home-image.square {
  width: 220px;
}

.home-image.square img {
  aspect-ratio: 1 / 1;
}

.home-image.portrait {
  width: 270px;
}

.home-image.portrait img {
  aspect-ratio: 1.05 / 1;
}

.welcome-copy {
  text-align: center;
  color: #2f2f2f;
  font-size: 18px;
  line-height: 1.9;
}

.soft-rule {
  border: 0;
  height: 1px;
  background: #ded3b8;
  margin: 46px 0 26px;
}

.intro-section {
  text-align: center;
  font-size: 18px;
  line-height: 1.9;
}

.intro-section h2,
.collection-intro h1,
.feature-photo h2 {
  color: #666;
  font-weight: 700;
  margin: 0 0 16px;
}

.intro-section p,
.collection-intro p {
  max-width: 1180px;
  margin: 0 auto 16px;
}

.collection-strip,
.preview-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 36px;
}

.collection-card {
  border: 0;
  background: transparent;
  color: #5d6875;
  text-align: center;
  padding: 0;
}

.collection-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin-bottom: 8px;
}

.collection-card span {
  display: block;
  font-size: 18px;
  font-weight: 700;
}

.collection-card small {
  color: #99a8bc;
}

.collection-card:hover img,
.collection-card.active img,
.gallery-tile:hover img,
.gallery-tile.active img {
  outline: 4px solid rgba(174, 187, 209, 0.75);
  outline-offset: -4px;
}

.interest-section {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 58px;
  align-items: start;
  text-align: center;
  font-size: 18px;
  line-height: 1.9;
}

.text-link {
  display: block;
  margin: 3px auto;
  color: #56728b;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.preview-row {
  margin-top: 0;
  grid-template-columns: repeat(3, 1fr);
}

.collection-page {
  padding: 82px 0 110px;
}

.collection-intro {
  text-align: center;
  line-height: 2;
  font-size: 20px;
}

.collection-intro h1 {
  font-size: 26px;
}

.breadcrumb {
  color: #9ba8b9;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.chapter-controls {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 32px;
}

.feature-photo {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  align-items: center;
  margin: 40px auto 34px;
  padding: 24px;
  max-width: 1040px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid #e4e4e4;
}

.feature-photo img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  background: #f5f5f5;
}

.feature-photo p {
  margin: 8px 0;
  line-height: 1.6;
}

.feature-photo small {
  color: #9aa7b9;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  background: #dfe3e9;
}

.gallery-tile {
  border: 0;
  padding: 0;
  background: #ececec;
  color: #555;
  position: relative;
}

.gallery-tile img {
  display: block;
  width: 100%;
  aspect-ratio: 1.12 / 1;
  object-fit: cover;
}

.gallery-tile span {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.84);
  color: #4f4f4f;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-photo,
.empty-state {
  min-height: 220px;
  display: grid;
  place-items: center;
  border: 1px dashed #b7c0cf;
  color: #8d9bad;
  background: rgba(255, 255, 255, 0.45);
}

.admin-screen {
  min-height: calc(100vh - var(--top));
  padding: 34px;
  background: #f2f2f2;
  color: #333;
}

.admin-login-screen {
  display: grid;
  place-items: start center;
  padding-top: 76px;
}

.admin-login-card {
  width: min(440px, calc(100vw - 48px));
  border: 1px solid #d8dde5;
  background: #fff;
  border-radius: 3px;
  padding: 26px;
  box-shadow: 0 18px 42px rgba(69, 78, 92, 0.08);
}

.admin-login-card h1 {
  margin: 0 0 16px;
  color: var(--heading);
  font-size: 34px;
  font-weight: 500;
}

.login-error {
  margin: 12px 0 0;
  color: #b84640;
  font-weight: 700;
}

.admin-shell {
  max-width: 1420px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 18px;
}

.admin-panel,
.chapter-editor,
.photo-card {
  border: 1px solid #d8dde5;
  background: #fff;
  border-radius: 3px;
}

.admin-panel {
  padding: 18px;
  align-self: start;
  position: sticky;
  top: calc(var(--top) + 18px);
}

.admin-title {
  margin: 0 0 16px;
  color: #555;
  font-size: 24px;
}

.admin-label {
  display: block;
  margin: 14px 0 6px;
  color: #75859a;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.field,
.textarea,
.select {
  width: 100%;
  border: 1px solid #d8dde5;
  background: white;
  color: #333;
  border-radius: 3px;
  padding: 10px 11px;
}

.textarea {
  min-height: 78px;
  resize: vertical;
}

.admin-actions,
.small-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.solid-button {
  background: #5f6f82;
  color: #fff;
}

.ghost-button {
  background: #fff;
}

.danger-button {
  background: #b84640;
  color: #fff;
}

.content-column {
  display: grid;
  gap: 18px;
}

.chapter-editor {
  padding: 16px;
}

.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.admin-section-header .admin-title {
  margin: 0;
}

.admin-section-body {
  margin-top: 16px;
}

.chapter-editor.collapsed {
  padding-bottom: 16px;
}

.chapter-editor.collapsed .admin-section-body {
  display: none;
}

.collapse-button {
  min-width: 64px;
}

.chapter-editor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.span-2 {
  grid-column: span 2;
}

.span-4 {
  grid-column: span 4;
}

.photo-import {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

.page-image-import {
  grid-template-columns: minmax(260px, 1fr) auto;
  margin-top: 14px;
}

.page-image-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.photo-card {
  overflow: hidden;
}

.custom-nav-editor {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.custom-nav-card {
  border: 1px solid #d8dde5;
  background: #fbfbfb;
  padding: 14px;
  border-radius: 3px;
}

.page-content-textarea,
.custom-page-textarea {
  min-height: 180px;
}

.small-empty {
  min-height: 110px;
  margin-top: 14px;
}

.photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: #ddd;
}

.photo-card-body {
  padding: 12px;
}

.muted {
  color: #738093;
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 980px) {
  :root {
    --top: 186px;
  }

  .site-header {
    grid-template-rows: 96px auto;
    position: relative;
  }

  .site-nav {
    gap: 14px;
    flex-wrap: wrap;
    padding-bottom: 12px;
    max-width: 92vw;
  }

  .utility-actions {
    position: static;
    justify-self: center;
    padding-bottom: 10px;
  }

  .cascade-menu {
    left: 0;
    right: 0;
    transform: none;
    width: min(92vw, 420px);
  }

  .menu-level,
  .year-menu {
    width: min(92vw, 420px);
  }

  .submenu {
    position: static;
    border-left: 1px solid var(--line);
    margin-left: 16px;
  }

  .menu-command {
    font-size: 24px;
  }

  .year-menu .menu-command {
    font-size: 23px;
  }

  .dropdown-col {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .home-page,
  .collection-page,
  .custom-page {
    width: min(100% - 28px, 760px);
  }

  .welcome-band,
  .profile-hero,
  .museum-highlights,
  .interest-section,
  .feature-photo,
  .admin-shell,
  .photo-import,
  .page-image-import {
    grid-template-columns: 1fr;
  }

  .preview-row,
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chapter-editor-grid {
    grid-template-columns: 1fr;
  }

  .span-2,
  .span-4 {
    grid-column: auto;
  }
}
