@layer museum {
  :root {
    --archive-green: #143d2c;
    --archive-paper: #faf7ee;
    --archive-gold: #b6954d;
    --archive-line: #dcded0;
  }

  /* A quiet masthead gives the stories and the original mark room to breathe. */
  .brand-header {
    position: sticky;
    top: 0;
    z-index: 5;
    display: block;
    min-height: 78px;
    padding: 0 18px;
    border-bottom: 1px solid #1f422319;
    background: #faf7eef5;
    color: var(--archive-green);
    color-scheme: light;
    backdrop-filter: blur(16px);
  }
  .header-inner {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 78px;
    max-width: 1440px;
    margin: auto;
  }
  .brand-header .wordmark {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 9px;
    min-width: 0;
    padding: 0;
    color: var(--archive-green);
    font: 400 clamp(1.1875rem,5.4cqw,1.625rem)/1.1 Georgia,"Times New Roman",serif;
    letter-spacing: -.045em;
  }
  .brand-header .wordmark img {
    width: 42px;
    height: 44px;
    flex: none;
    object-fit: contain;
    padding: 0;
    border-radius: 10px;
    background: transparent;
  }
  .brand-header .wordmark-of { font: inherit; }
  .brand-header .wordmark small {
    display: block;
    margin-top: 6px;
    color: #61715b;
    font: 500 .5rem/1.3 "DM Sans",system-ui,sans-serif;
    letter-spacing: .015em;
  }
  .brand-header .site-nav { display: none; }
  .brand-header .header-actions { display: flex; align-items: center; gap: 8px; grid-column: auto; grid-row: auto; }
  .brand-header .header-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid #d5dccd;
    border-radius: 14px;
    color: var(--archive-green);
    background: #f0f1e6;
    transition: background .18s,border-color .18s;
  }
  .header-search-label, .header-search kbd { display: none; }
  .brand-header .header-search:hover { background: #e6eddf; border-color: #a4b59b; }
  .brand-header .header-collections, .brand-header .desktop-browse { display: none; }
  .brand-header :is(a,button):focus-visible, .mobile-museum-dock :is(a,button):focus-visible { outline: 2px solid #9d7833; outline-offset: 4px; }

  /* The active destination stays labelled, while the dock floats above the page. */
  #experience { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .mobile-museum-dock {
    position: fixed;
    z-index: 6;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    max-width: 560px;
    margin-inline: auto;
    border: 1px solid #e1e4d7;
    border-radius: 23px;
    padding: 6px;
    background: #fffdf6f5;
    box-shadow: 0 12px 40px #17382324,0 2px 5px #1738230b;
    backdrop-filter: blur(20px);
    color-scheme: light;
  }
  .mobile-museum-dock .bottom-navigation,
  .site-frame[data-device=mobile] .mobile-museum-dock .bottom-navigation {
    position: static;
    display: grid;
    grid-template-columns: repeat(5,minmax(0,1fr));
    align-items: stretch;
    inset: auto;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
    gap: 2px;
  }
  .mobile-museum-dock .bottom-navigation > :is(a,button) {
    display: grid;
    place-content: center;
    justify-items: center;
    position: relative;
    min-width: 0;
    min-height: 61px;
    padding: 7px 0;
    gap: 5px;
    border: 0;
    border-radius: 17px;
    color: #5a6b57;
    background: transparent;
    font-size: .6875rem;
    line-height: 1.25;
    font-weight: 500;
    transition: color .18s,background .18s;
  }
  .mobile-museum-dock .bottom-navigation > :is(a,button) > span:first-child {
    position: relative;
    display: grid;
    place-items: center;
    width: 30px;
    height: 25px;
    border-radius: 0;
    background: transparent;
  }
  .bottom-navigation > :is(a,button) svg { width: 23px; height: 23px; stroke-width: 1.7; }
  .mobile-museum-dock .bottom-navigation > :is([aria-current],.is-selected) {
    color: #fff9e9;
    background: var(--archive-green);
    font-weight: 650;
    box-shadow: 0 3px 8px #123a2b18;
  }
  .mobile-museum-dock .bottom-navigation > :is(a,button):hover:not([aria-current],.is-selected) { background: #edf1e5; color: #143d2c; }
  .bottom-navigation a[href="#films"][aria-current] svg { fill: currentColor; }
  .mobile-museum-dock .bottom-navigation small {
    position: absolute;
    top: -4px;
    right: -6px;
    border: 2px solid #fffdf6;
    padding: 0 4px;
    min-width: 18px;
    border-radius: 20px;
    background: #dfbd66;
    color: #1d402f;
    font-size: .625rem;
    line-height: 14px;
  }
  .site-frame[data-device=mobile] .mobile-museum-dock { left: 50%; right: auto; width: min(410px,calc(100% - 20px)); transform: translateX(-50%); }
  .museum-resume {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 4px 7px;
    padding: 5px 3px 10px;
    min-height: 62px;
    border-bottom: 1px solid #dce2d1;
    color: #234430;
  }
  .museum-resume > img { width: 45px; height: 42px; object-fit: cover; border-radius: 9px; flex: none; }
  .museum-resume > span:nth-child(2) { display: grid; gap: 4px; flex: 1; min-width: 0; }
  .museum-resume small { font-size: .625rem; color: #607259; }
  .museum-resume strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .75rem; }
  .museum-resume-play { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #e8efde; flex: none; }
  #experience:has(.museum-resume) { padding-bottom: calc(180px + env(safe-area-inset-bottom)); }
  #experience:has(.museum-resume) .editor-actions { bottom: calc(160px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(108px + env(safe-area-inset-bottom)); }
  body:has(.museum-resume) .toast { bottom: calc(178px + env(safe-area-inset-bottom)); }

  /* A tighter opening puts an actual story within the first screen. */
  .discovery-home { width: calc(100% - 36px); }
  .discovery-home .discovery-welcome { padding-top: 25px; }
  .discovery-home .discovery-welcome .eyebrow { color: #65785a; font-size: .625rem; letter-spacing: .075em; }
  .discovery-home .discovery-welcome h1 { margin: 12px 0 10px; font: 400 clamp(2rem,9.7cqw,2.75rem)/1.07 Georgia,"Times New Roman",serif; letter-spacing: -.055em; }
  .discovery-home .discovery-welcome h1 em { color: #4a6743; font-weight: 400; }
  .discovery-home .discovery-welcome p:not(.eyebrow) { max-width: 35ch; font-size: .8125rem; line-height: 1.6; color: #63705b; }
  .discovery-home .discovery-launcher { margin-top: 18px; min-height: 50px; padding: 13px 15px; border: 1px solid #d4d9c8; border-radius: 12px; background: #fffdf6; font-size: .8125rem; color: #64745c; box-shadow: 0 3px 10px #18352303; }
  .discovery-home .discovery-launcher svg { width: 19px; height: 19px; }
  .discovery-home .topic-rail { gap: 8px; padding-block: 16px; }
  .discovery-home .topic-chip { min-height: 44px; padding: 11px 15px; font-size: .75rem; border-color: #d8ddcd; }
  .discovery-home .topic-chip[aria-pressed=true] { background: #254a32; border-color: #254a32; }
  .discovery-home .lead-story { border-radius: 18px; }
  .discovery-home .lead-story > a { min-height: 320px; aspect-ratio: 1; }
  .discovery-home .lead-story-content { inset: auto 20px 22px; gap: 9px; }
  .discovery-home .lead-story-content > small { font-size: .625rem; letter-spacing: .06em; }
  .discovery-home .lead-story-content > strong { max-width: 17ch; font: 400 clamp(1.625rem,7.8cqw,2.5rem)/1.1 Georgia,"Times New Roman",serif; letter-spacing: -.035em; }
  .discovery-home .lead-story-content > span:not(.lead-cta) { font-size: .8125rem; line-height: 1.55; }
  .discovery-home .lead-story-content .lead-cta { gap: 7px; margin-top: 3px; font-size: .75rem; }
  .discovery-home .home-side { gap: 22px; }
  .home-trail-preview { display: none; }
  .discovery-home .continue-card { border-radius: 14px; background: #edf0e3; padding: 18px; }
  .discovery-home .home-quick h2, .discovery-home .discovery-section h2 { font: 400 1.5rem/1.15 Georgia,"Times New Roman",serif; letter-spacing: -.035em; }
  .discovery-home .home-quick a { font-size: .75rem; }
  .discovery-home .home-quick a > span { border-radius: 14px; background: #f9f7ee; }
  .discovery-home .personal-home { margin-top: 26px; padding: 16px; border: 1px solid #d5ddc9; border-radius: 14px; background: #faf9f0; }
  .personal-home .button-row { gap: 8px; }
  .personal-home .button-row > a { font-size: .8125rem; margin-right: auto; }
  .personal-home .button-row > span { font-size: .75rem; }
  .personal-home .pill { font-size: .75rem; padding-inline: 12px; min-height: 44px; }
  .personal-home .resume-banner { display: none; }

  .overlay[data-mode=navigation] {
    --paper: #faf7ee; --ink: #163e2d; --soft: #65765c; --line: #d9dfce; --accent: #214e32;
    width: min(100%,960px);
    max-height: calc(100dvh - 16px);
    margin: auto auto 0;
    border: 1px solid #d5dccb;
    border-bottom: 0;
    border-radius: 25px 25px 0 0;
    background: #faf7ee;
    color: #163e2d;
    box-shadow: 0 -15px 80px #132d2630;
  }
  .overlay[data-mode=navigation] .dialog-content { max-height: calc(100dvh - 18px); padding: 12px 20px calc(24px + env(safe-area-inset-bottom)); }
  .overlay[data-mode=navigation] .sheet-handle { width: 36px; height: 4px; margin-bottom: 24px; background: #c7cfba; border-radius: 4px; }
  .overlay[data-mode=navigation] .eyebrow { font-size: .625rem; letter-spacing: .08em; color: #6a7a60; }
  .overlay[data-mode=navigation] h2 { margin: 10px 40px 0 0; font: 400 clamp(1.75rem,7cqw,2.5rem)/1.1 Georgia,"Times New Roman",serif; letter-spacing: -.045em; }
  .overlay[data-mode=navigation] .sheet-intro { margin: 12px 0 24px; color: #64705c; font-size: .8125rem; }
  .overlay[data-mode=navigation] .dialog-close { position: sticky; float: right; z-index: 2; top: 12px; margin: 18px 0 0 12px; background: #e9efdf; color: #244b32; box-shadow: none; border: 0; border-radius: 50%; }
  .navigation-layout { display: grid; gap: 20px; }
  .navigation-cards { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .navigation-cards a { min-height: 142px; border: 0; border-radius: 13px; }
  .navigation-cards a > img { opacity: .86; transition: transform .3s; }
  .navigation-cards a::before { background: linear-gradient(0deg,#09271aef,transparent 95%); }
  .navigation-cards a > span { padding: 15px; gap: 6px; }
  .navigation-cards strong { font: 400 1.375rem/1.1 Georgia,"Times New Roman",serif; }
  .navigation-cards small { color: #eeeedd; font-size: .625rem; line-height: 1.5; }
  .navigation-cards a:hover > img { transform: scale(1.05); }
  .navigation-links { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 16px; }
  .navigation-links a { display: flex; align-items: start; gap: 9px; min-height: 76px; padding-block: 15px; border-top: 1px solid #dce1d2; }
  .navigation-links a > span:first-child { display: grid; place-items: center; padding-top: 1px; color: #67805a; }
  .navigation-links a > span:last-child { display: grid; gap: 5px; }
  .navigation-links strong { font-size: .75rem; font-weight: 650; line-height: 1.35; }
  .navigation-links small { font-size: .625rem; color: #687760; line-height: 1.5; }
  .navigation-links a:hover strong, .navigation-links a[aria-current] strong { text-decoration: underline; text-underline-offset: 4px; }
  .overlay[data-mode=navigation] .sheet-library { margin-top: 20px; padding: 16px; border: 1px solid #d3ddc4; border-radius: 12px; color: #244b32; background: #eaf0df; }
  .overlay[data-mode=navigation] .sheet-library small { color: #617257; }

  @container (min-width: 640px) {
    .brand-header { padding-inline: 30px; }
    .brand-header .wordmark img { width: 48px; height: 50px; }
    .brand-header .wordmark small { font-size: .625rem; }
    .brand-header .header-search { min-width: 190px; padding-inline: 15px; justify-content: start; }
    .header-search-label { display: inline; font-size: .8125rem; font-weight: 400; }
    .brand-header .header-search kbd { display: inline-grid; place-items: center; margin-left: auto; width: 21px; height: 22px; border: 1px solid #d3dcca; border-radius: 5px; font: 400 .6875rem "DM Sans",sans-serif; color: #8b9981; }
    .discovery-home { width: calc(100% - 60px); }
    .discovery-home .discovery-welcome { padding-top: 32px; }
    .discovery-home .discovery-welcome h1 { font-size: 3rem; }
    .discovery-home .discovery-welcome h1 br { display: none; }
    .discovery-home .lead-story > a { aspect-ratio: 1.5; }
    .discovery-home .lead-story-content > strong { font-size: 2.75rem; }
    .navigation-links strong { font-size: .875rem; }
  }
  @container (max-width: 959px) {
    #experience:has(#discovery-query:focus) .mobile-museum-dock { display: none; }
    #experience:has(#discovery-query:focus) { padding-bottom: 24px; }
  }
  @container (min-width: 960px) {
    #experience, #experience:has(.museum-resume) { padding-bottom: 0; }
    .brand-header { padding-inline: 4%; }
    .header-inner { grid-template-columns: minmax(0,1fr) auto; gap: 0 28px; min-height: 86px; }
    .brand-header .wordmark { grid-row: 1; grid-column: 1; font-size: 1.75rem; min-height: 86px; gap: 12px; }
    .brand-header .wordmark img { width: 50px; height: 52px; }
    .brand-header .wordmark small { font-size: .625rem; letter-spacing: .035em; }
    .brand-header .header-actions { grid-row: 1; grid-column: 2; }
    .brand-header .header-collections, .brand-header .desktop-browse { display: inline-grid; position: relative; width: 44px; height: 44px; border-radius: 13px; }
    .brand-header .header-collections:hover, .brand-header .desktop-browse:hover, .brand-header .header-collections[aria-current] { background: #e7eddd; border-color: transparent; }
    .header-collections small { position: absolute; right: 1px; top: 0; min-width: 16px; padding: 1px 4px; border-radius: 20px; background: #d8b75f; font-size: .5625rem; text-align: center; color: #173d2c; }
    .brand-header .site-nav { display: flex; grid-column: 1/-1; grid-row: 2; align-items: center; justify-content: center; gap: 38px; width: 100%; margin: 0; padding: 0; border-top: 1px solid #d9dfce; }
    .brand-header .site-nav a { position: relative; display: flex; align-items: center; min-height: 45px; padding: 0 2px; white-space: nowrap; font-size: .8125rem; font-weight: 500; color: #617057; }
    .brand-header .site-nav a:hover, .brand-header .site-nav a[aria-current] { color: #16452d; }
    .brand-header .site-nav a[aria-current] { font-weight: 700; }
    .brand-header .site-nav a[aria-current]::after { inset: auto 2px 0; height: 3px; border-radius: 3px 3px 0 0; background: #9f8544; }
    .mobile-museum-dock { display: none; }
    .discovery-home { width: calc(100% - 8%); }
    .discovery-home .discovery-welcome { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 48px; align-items: end; padding-top: 38px; }
    .discovery-home .discovery-welcome .eyebrow { font-size: .6875rem; }
    .discovery-home .discovery-welcome h1 { font-size: clamp(2.75rem,4.2cqw,3.75rem); margin-top: 13px; }
    .discovery-home .discovery-welcome p:not(.eyebrow) { font-size: .9375rem; max-width: none; }
    .discovery-home .discovery-launcher { margin: 0 0 3px; min-height: 54px; font-size: .875rem; }
    .discovery-home .topic-rail { padding-block: 22px; }
    .discovery-home .topic-chip { min-height: 44px; }
    .discovery-home .discovery-lead { grid-template-columns: minmax(0,1.9fr) minmax(0,1fr); gap: 24px; }
    .discovery-home .lead-story > a { aspect-ratio: 1.7; min-height: 400px; }
    .discovery-home .lead-story-content { inset: auto 30px 29px; gap: 12px; }
    .discovery-home .lead-story-content > small { font-size: .6875rem; }
    .discovery-home .lead-story-content > strong { font-size: 2.75rem; max-width: 19ch; }
    .discovery-home .lead-story-content > span:not(.lead-cta) { font-size: .9375rem; max-width: 54ch; }
    .discovery-home .lead-story-content .lead-cta { font-size: .8125rem; }
    .discovery-home .home-side { display: grid; grid-template-columns: 1fr; align-content: space-between; gap: 20px; padding: 24px; border: 1px solid #d6dfc9; border-radius: 18px; background: #edf0e3; }
    .home-trail-preview { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
    .home-trail-preview a { display: grid; gap: 7px; min-width: 0; }
    .home-trail-preview img { width: 100%; aspect-ratio: 1.45; object-fit: cover; border-radius: 8px; }
    .home-trail-preview span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .625rem; color: #52684b; }
    .home-trail-preview a:hover span { text-decoration: underline; text-underline-offset: 3px; }
    .discovery-home .continue-card { padding: 0; border: 0; background: transparent; align-items: start; }
    .discovery-home .continue-icon { background: #dce5ce; width: 38px; height: 38px; }
    .discovery-home .continue-card > span:nth-child(2) { gap: 7px; }
    .discovery-home .continue-card strong { font: 400 1.375rem/1.2 Georgia,serif; letter-spacing: -.035em; }
    .discovery-home .continue-card small { font-size: .5625rem; letter-spacing: .07em; }
    .discovery-home .continue-card span span { font-size: .75rem; line-height: 1.6; }
    .discovery-home .home-quick h2 { font-size: 1.125rem; }
    .discovery-home .home-quick > div:last-child { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin-top: 14px; }
    .discovery-home .home-quick a { display: flex; align-items: center; min-height: 48px; padding: 10px; gap: 7px; border: 1px solid #cfd9c0; border-radius: 11px; background: #f6f7ed; font-size: .6875rem; }
    .discovery-home .home-quick a > span { display: contents; }
    .discovery-home .home-quick a svg { width: 18px; height: 18px; }
    .discovery-home .home-quick a:hover { background: #e4ecd8; border-color: #afc19b; }
    .discovery-home .personal-home { margin-top: 24px; padding: 14px 18px; }
    .discovery-home .discovery-section h2 { font-size: 1.875rem; }
    .personal-home .resume-banner { display: flex; }
    .toast, body:has(.museum-resume) .toast { bottom: 24px; }
    #experience:has(.museum-resume) .editor-actions { bottom: 0; }
  }
  @container (min-width: 1200px) {
    .header-inner { grid-template-columns: auto minmax(0,1fr) auto; gap: 28px; min-height: 96px; }
    .brand-header .wordmark { min-height: 96px; font-size: 1.8125rem; }
    .brand-header .site-nav { grid-row: 1; grid-column: 2; border: 0; gap: clamp(16px,1.7cqw,26px); justify-content: center; }
    .brand-header .site-nav a { min-height: 96px; }
    .brand-header .site-nav a[aria-current]::after { inset: auto 2px 23px; height: 2px; }
    .brand-header .header-actions { grid-column: 3; gap: 5px; }
    .brand-header .header-search { min-width: 150px; }
  }
  @media (min-width: 720px) {
    .overlay[data-mode=navigation] { width: min(960px,calc(100% - 48px)); margin: auto; border: 1px solid #d5dccb; border-radius: 24px; }
    .overlay[data-mode=navigation] .dialog-content { padding: 32px; max-height: calc(100dvh - 32px); }
    .overlay[data-mode=navigation] .sheet-handle { display: none; }
    .overlay[data-mode=navigation] .dialog-close { top: 0; margin-top: 0; }
    .overlay[data-mode=navigation] h2 { font-size: 2.5rem; }
    .navigation-layout { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 28px; }
    .navigation-cards a { min-height: 157px; }
    .navigation-links a { min-height: 69px; padding-block: 12px; }
    .navigation-links strong { font-size: .75rem; }
    .navigation-links small { font-size: .625rem; }
  }
  @media (prefers-reduced-motion: reduce) {
    .brand-header .header-search, .bottom-navigation > :is(a,button), .navigation-cards a > img { transition: none; }
  }
  @media print {
    .brand-header, .mobile-museum-dock { display: none !important; }
    #experience, #experience:has(.museum-resume) { padding-bottom: 0; }
  }
}
