/* One header line. The logo is Home; the compact menu contains all library links. */
.top { position: relative; z-index: 10; flex-wrap: nowrap; background: var(--surface); margin: 0; border-radius: 0; }
.top > .wordmark { flex: 0 0 auto; max-width: min(26vw, 16rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The server's logo in place of its name, or beside it. */
.has-logo.wordmark { display: flex; align-items: center; gap: .6rem; }
.top > .wordmark.has-logo { display: inline-flex; max-width: min(40vw, 20rem); }
.has-logo.wordmark > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.wordmark-logo { display: block; flex: none; height: 2.4rem; width: auto; max-width: 100%; object-fit: contain; object-position: left center; }
.auth .wordmark-logo { height: 4.5rem; }
.top .nav { flex: 1 1 auto; min-width: 0; width: auto; order: 0; overflow: hidden; }
.top .nav a { font-weight: 400; text-transform: none; letter-spacing: 0; }
.top .nav a[aria-current="page"] { border-color: var(--accent); }
.top .search-form { min-width: 6rem; }
.nav-toggle { display: none; width: 2.6rem; height: 2.6rem; padding: .6rem; flex-shrink: 0; border: 0; }
.nav-toggle span { width: 1.2rem; height: 2px; background: currentColor; position: relative; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; width: 100%; height: 2px; background: currentColor; left: 0; }
.nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }
.top.compact-nav .nav { display: none; position: absolute; left: var(--gutter); top: calc(100% + .25rem); width: min(24rem, calc(100vw - 2 * var(--gutter))); flex-direction: column; max-height: calc(100vh - var(--top-h, 4rem) - 1rem); overflow-y: auto; overscroll-behavior: contain; }
.top.compact-nav.nav-open .nav { display: flex; }
.top.compact-nav .nav a { white-space: normal; overflow-wrap: anywhere; }
.top.compact-nav .search-form { flex: 1 1 12rem; }
.account-menu { position: relative; flex: 0 0 auto; }
.account-menu summary { cursor: pointer; list-style: none; overflow: hidden; text-overflow: ellipsis; }
.account-menu summary::-webkit-details-marker { display: none; }
/* The menu's look is material.css's (Menus); here, where it hangs. */
.account-links { position: absolute; right: 0; }
.account-links [hidden] { display: none; }

/* Full-bleed banner: no spacer, rounded frame or side gutter between it and the header. */
.home-page { padding-top: 0; }
.home-page > .section:first-child, .home-page > .visually-hidden:first-child + .section { padding-top: 1.5rem; }
.home-page > .banner { animation: none !important; }
.home-section { container-type: inline-size; }
.home-section-description { color: var(--muted); max-width: 60rem; }
.home-section .row { grid-template-rows: auto; gap: var(--card-gap, 1.4rem); scrollbar-width: none; }
.home-section .row::-webkit-scrollbar { display: none; }
.home-section .row.posters { grid-auto-columns: var(--card-size, clamp(8.5rem, 16cqw, 11rem)); }
.home-section .row.wide { --wide-track: var(--card-size-wide, clamp(14rem, 25cqw, 19rem)); grid-auto-columns: var(--wide-track); }

/* Hero rows share TV's fixed first feature. The remaining cards never expand on scroll. */
.row.posters > .feature-card { grid-column: span 2; }
.feature-card .art { height: auto; aspect-ratio: 16 / 9; }
.feature-text { padding-top: 0.6rem; }
.feature-card .feature-title { margin: 0.35rem 0 0; font: 500 1.15rem/1.25 var(--font-display); white-space: normal; }
.feature-card .feature-facts { margin: 0; font-size: var(--type-tiny); color: var(--muted); white-space: normal; }
.feature-card .feature-overview { margin: 0.55rem 0 0; color: var(--muted); font-size: var(--type-caption); line-height: 1.5; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
/* A narrow editor canvas also keeps the feature inside its row. */
@container (max-width: 440px) { .home-section .row.posters.featured { grid-auto-columns: min(var(--card-size, 8.5rem), calc((100cqw - var(--card-gap, 1.4rem)) / 2)); } }

/* Segmented choices (.segmented) are in material.css. */
.history-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .6rem 0; border-top: 1px solid var(--line); }
@media (max-width: 640px) { .top { gap: .65rem; padding: .8rem var(--gutter); } .top .wordmark { font-size: 1.5rem; } .top .wordmark-logo { height: 2rem; } .account-menu summary { max-width: 5rem; padding: .5rem; } .top.compact-nav .search-form { flex-basis: 5rem; } }
