/* Frontier — editorial film directory. Vanilla CSS, one local typeface. */

@font-face {
  font-family: "Manrope";
  src: url("assets/fonts/Manrope.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --ink: #0a0a0a;
  --ink-2: #3d3d3d;
  --muted: #6e6e6e;
  --rule: #e2e2e2;
  --rule-strong: #0a0a0a;
  --night: #0b0b0b;
  --night-2: #161616;
  --night-rule: #2a2a2a;
  --night-muted: #a3a3a3;
  --bronze: #b38b63;      /* on night surfaces and rules */
  --bronze-ink: #7d5a37;  /* bronze text on paper, ≥4.5:1 */
  --focus: #0a0a0a;
  --gutter: clamp(16px, 3.2vw, 40px);
  --max: 1320px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: "Manrope", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 24px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--ink); color: var(--paper); }
.drawer ::selection, .feature ::selection { background: #fff; color: var(--ink); }
input, textarea { caret-color: var(--ink); }
html { scrollbar-color: #9a9a9a var(--paper); accent-color: var(--ink); }
.drawer { scrollbar-color: #4a4a4a var(--night); }
a { text-underline-offset: 3px; }
.row__num, .row__score-num, .toolbar__count, .tab sup { font-variant-numeric: tabular-nums; }

img, svg, video, iframe { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
p { margin: 0; }
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.drawer :focus-visible, .feature :focus-visible, .slate :focus-visible { outline-color: #fff; }

.skip {
  position: fixed; left: 12px; top: 12px; z-index: 50;
  background: var(--ink); color: var(--paper); padding: 10px 14px; text-decoration: none;
  font-size: 13px; font-weight: 600;
  transform: translateY(calc(-100% - 24px));
}
.skip:focus { transform: none; }

svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: square; stroke-linejoin: miter; }

/* ------------------------------------------------------------------ Masthead */

.masthead { background: var(--paper); border-bottom: 1px solid var(--rule); }

.masthead__bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: clamp(14px, 1.8vw, 22px) var(--gutter);
  border-bottom: 1px solid var(--rule);
}

.masthead__edition {
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}

.wordmark {
  margin: 0;
  font-weight: 300;
  font-size: clamp(2.1rem, 7.4vw, 6rem);
  line-height: .86;
  letter-spacing: .015em;
  text-transform: uppercase;
}
.wordmark a { text-decoration: none; display: block; padding: .04em 0 .02em; }

.masthead__tools { display: flex; justify-content: flex-end; align-items: center; gap: 4px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 44px; height: 44px; padding: 0 8px;
  border: 0; background: transparent; position: relative;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover svg { transform: translateY(-1px); }
.icon-btn__count {
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
  min-width: 1ch;
}
.icon-btn--text .icon-btn__label {
  font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.icon-btn[aria-pressed="true"] { background: var(--ink); color: #fff; }
.icon-btn--saved-active svg { fill: currentColor; }

/* Sections / categories */
.sections { position: relative; }
.tabs {
  display: flex; justify-content: center; justify-content: safe center; gap: clamp(18px, 3vw, 40px);
  padding: 0 var(--gutter);
  overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex: 0 0 auto; scroll-snap-align: start;
  border: 0; background: none; padding: 15px 0 13px;
  font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-2); position: relative; white-space: nowrap;
}
.tab sup { font-size: 11px; font-weight: 700; margin-left: 3px; color: var(--muted); letter-spacing: 0; vertical-align: 5px; }
.tab::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--ink); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.tab:hover { color: var(--ink); }
.tab[aria-pressed="true"] { color: var(--ink); }
.tab[aria-pressed="true"]::after { transform: scaleX(1); }
.tab--saved { padding-left: clamp(18px, 3vw, 40px); border-left: 1px solid var(--rule); margin-left: 0; }
.tab--saved::after { left: clamp(18px, 3vw, 40px); }

/* ------------------------------------------------------------------ Feature */

.feature { position: relative; background: var(--night); color: #fff; }

.feature__media {
  position: relative; width: 100%;
  aspect-ratio: 16 / 9; max-height: min(80vh, 820px); min-height: 320px;
  overflow: hidden; background: var(--night); color: #fff;
}
.feature__media img, .feature__media video, .feature__media iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0;
}
.feature__media > .slate { position: absolute; inset: 0; }
.feature__media img { animation: settle 1.6s var(--ease) both; }
.feature__media video, .feature__media iframe { object-fit: contain; background: #000; color: #fff; }

.feature__scrim {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.28) 38%, rgba(0,0,0,0) 62%);
}

.feature.is-playing .feature__caption { position: static; padding-top: 24px; }
.feature.is-playing .feature__scrim { display: none; }
.feature__caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0 var(--gutter) clamp(28px, 5vw, 64px);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px;
}
.feature__play {
  width: 64px; height: 64px; border-radius: 50%;
  border: 1.5px solid #fff; background: rgba(0,0,0,.18); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: clamp(4px, 2vw, 22px); text-decoration: none;
  transition: background .3s var(--ease), transform .3s var(--ease);
}
.feature__play svg { width: 22px; height: 22px; fill: currentColor; stroke: none; margin-left: 3px; }
.feature__play:hover { background: rgba(255,255,255,.16); transform: scale(1.04); }

.feature__title {
  margin: 0; max-width: 24ch;
  font-size: clamp(1.8rem, 4vw, 3.5rem); font-weight: 700; line-height: 1.02; letter-spacing: -.02em;
  text-wrap: balance;
}
.feature__meta { font-size: 15px; font-weight: 400; color: rgba(255,255,255,.86); max-width: 62ch; text-wrap: balance; }
.feature__meta span:first-child { font-weight: 700; color: #fff; }
.feature__meta span + span::before { content: "·"; margin: 0 .55em; opacity: .7; }
.feature__dek {
  max-width: 60ch; font-size: clamp(15px, 1.25vw, 17px); line-height: 1.5; font-weight: 300; color: rgba(255,255,255,.9);
  text-wrap: pretty; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.feature__credit { font-size: 13px; color: rgba(255,255,255,.72); }
.feature__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 6px; }

/* ------------------------------------------------------------------ Slate (typographic fallback for missing stills) */

.slate {
  position: relative; background: var(--night); color: #fff; overflow: hidden;
  display: grid; place-items: center; container-type: inline-size;
}
.slate::before {
  content: ""; position: absolute; inset: 7%;
  border: 1px solid rgba(255,255,255,.14);
  pointer-events: none;
}
.slate__word {
  font-weight: 200; text-transform: uppercase; letter-spacing: .02em;
  font-size: clamp(1.2rem, 11cqi, 9rem); line-height: .9; color: rgba(255,255,255,.14);
  white-space: nowrap; user-select: none; max-width: 86%; overflow: hidden; text-overflow: ellipsis;
}
.slate__corner {
  position: absolute; font-size: clamp(11px, 2.6cqi, 12px); font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(255,255,255,.62); white-space: nowrap;
  max-width: 40%; overflow: hidden; text-overflow: ellipsis;
}
.slate__corner--tl { top: 3.2%; left: 7%; }
.slate__corner--tr { top: 3.2%; right: 7%; font-variant-numeric: tabular-nums; }
.slate__corner--bl { bottom: 3.2%; left: 7%; }
.slate--large .slate__word { font-size: clamp(2.4rem, 11.5cqi, 12rem); }
.slate--large .slate__corner--tl, .slate--large .slate__corner--tr { top: calc(3.6% + 4px); }

/* ------------------------------------------------------------------ Intro */

.intro {
  max-width: 820px; margin: 0 auto; text-align: center;
  padding: clamp(40px, 6vw, 80px) var(--gutter) clamp(28px, 4vw, 48px);
}
.intro__title { margin: 0 0 14px; font-size: clamp(1.6rem, 2.8vw, 2.25rem); font-weight: 300; line-height: 1.1; letter-spacing: -.02em; }
.intro__text { font-size: clamp(1.05rem, 1.7vw, 1.3rem); line-height: 1.5; font-weight: 400; color: var(--ink-2); text-wrap: pretty; }

/* ------------------------------------------------------------------ Directory */

.directory { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) clamp(56px, 8vw, 120px); outline: none; }

.directory__head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); align-items: end; gap: 24px;
  padding: 10px 0 18px;
}
.directory__title {
  margin: 0; font-size: clamp(2rem, 4.4vw, 3.6rem); font-weight: 300; line-height: 1; letter-spacing: -.02em;
}
.directory__basis { font-size: 13px; color: var(--muted); text-align: right; line-height: 1.45; }
.directory__basis strong { color: var(--ink); font-weight: 700; }

.toolbar {
  display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap;
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule);
  padding: 10px 0;
}
.field { display: flex; align-items: center; gap: 10px; }
.field--search { flex: 1 1 300px; min-width: 0; }
.field--search svg { width: 18px; height: 18px; flex: none; }
.field--search input {
  width: 100%; min-width: 0; border: 0; background: transparent; padding: 10px 0; font-size: 15px;
}
.field--search input:focus { outline: none; }
.field--search:focus-within { box-shadow: inset 0 -2px 0 var(--ink); }
.field--search input::placeholder { color: var(--muted); }
.field--search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.field--sort label { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.field--sort select {
  appearance: none; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; background: transparent;
  padding: 8px 22px 6px 0; font-size: 14px; font-weight: 600;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 9px) 55%, calc(100% - 4px) 55%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.toolbar__count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px;
  border: 1px solid var(--ink); background: var(--paper); color: var(--ink);
  font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  white-space: nowrap; border-radius: 0;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn svg { width: 14px; height: 14px; }
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: #2b2b2b; }
.btn--quiet { border-color: transparent; padding: 0 6px; text-decoration: underline; text-underline-offset: 4px; }
.btn--quiet:hover { background: transparent; color: var(--ink); text-decoration-thickness: 2px; }
.btn--light { background: #fff; color: var(--ink); border-color: #fff; }
.btn--light:hover { background: rgba(255,255,255,.86); color: var(--ink); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn--ghost:hover { background: #fff; color: var(--ink); }
.btn[disabled] { opacity: .35; cursor: not-allowed; }
.btn[disabled]:hover { background: transparent; color: inherit; }
.btn--file { position: relative; overflow: hidden; cursor: pointer; }
.btn--file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.btn--file:focus-within { outline: 2px solid var(--focus); outline-offset: 3px; }

/* Curator bar */
.curator-bar {
  display: flex; justify-content: space-between; gap: 18px 32px; flex-wrap: wrap; align-items: center;
  background: #f4f2ef; border-top: 1px solid var(--bronze);
  padding: 16px 18px; margin-bottom: 16px;
}
.curator-bar__title { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 4px; }
.curator-bar__help { font-size: 13px; color: var(--ink-2); max-width: 56ch; }
.curator-bar__help + .curator-bar__help { margin-top: 6px; color: var(--bronze-ink); }
.curator-bar__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.curator-bar__switch { display: flex; }
.btn--seg { gap: 10px; }
.btn--seg + .btn--seg { border-left: 0; }
.btn--seg span { font-weight: 400; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.btn--seg[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.btn--select[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.btn--select[aria-pressed="true"]:hover { background: #2b2b2b; }

/* ------------------------------------------------------------------ Ranked rows */

.rank-list { list-style: none; margin: 0; padding: 0; }

.row {
  display: grid;
  grid-template-columns: 76px minmax(220px, 400px) minmax(0, 1fr) auto;
  grid-template-areas: "rank thumb body actions";
  gap: 0 clamp(16px, 2.4vw, 32px);
  align-items: start;
  padding: clamp(18px, 2.4vw, 28px) 0;
  border-bottom: 1px solid var(--rule);
}
.rank-list--enter .row { animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }

.row__rank { grid-area: rank; padding-top: 2px; }
.row__num {
  display: block; font-size: clamp(2.2rem, 3.6vw, 3.2rem); font-weight: 200; line-height: .9;
  font-variant-numeric: tabular-nums; letter-spacing: -.03em;
}
.row__status {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); line-height: 1.3;
}
.row__status--on { color: var(--bronze-ink); }
.row--inbox .row__thumb img { filter: grayscale(.6); opacity: .8; }

.row__thumb {
  grid-area: thumb; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0;
  background: var(--night); color: #fff; overflow: hidden; position: relative;
}
.row__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), opacity .4s; }
.row__thumb:hover img { transform: scale(1.035); }
.row__thumb .slate { position: absolute; inset: 0; }
.row__dur {
  position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.78); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 6px; font-variant-numeric: tabular-nums; letter-spacing: .04em;
}

.row__body { grid-area: body; min-width: 0; }
.row__meta {
  display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.row__meta span:first-child { color: var(--ink); }
.row__title { margin: 0 0 6px; font-size: clamp(1.3rem, 2.1vw, 1.85rem); font-weight: 600; line-height: 1.12; letter-spacing: -.015em; text-wrap: balance; }
.row__title button {
  border: 0; background: none; padding: 0; text-align: left; font: inherit; letter-spacing: inherit;
  text-decoration: none; overflow-wrap: anywhere;
  background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px;
  background-repeat: no-repeat; background-position: 0 100%; transition: background-size .35s var(--ease);
}
.row__title button:hover { background-size: 100% 1px; }
.row__by { font-size: 13px; color: var(--muted); }
.row__by--maker { font-size: 15px; color: var(--ink); font-weight: 500; }
.row__note { margin-top: 12px; font-size: 15px; line-height: 1.55; color: var(--ink-2); max-width: 62ch; text-wrap: pretty; }
.row__tools { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid currentColor; padding: 3px 7px; line-height: 1.2;
}

.row__actions { grid-area: actions; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.row__actions .icon-btn { border: 1px solid var(--rule); }
.row__actions .icon-btn:hover { border-color: var(--ink); }
.save-btn[aria-pressed="true"] svg { fill: currentColor; }

.row__curate {
  grid-column: 3 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--rule);
}
.row__curate .btn { min-height: 34px; padding: 0 12px; }
.row__curate .icon-btn { min-width: 36px; height: 34px; border: 1px solid var(--ink); }
.row__curate .icon-btn svg { width: 16px; height: 16px; }
.row__curate .icon-btn[disabled] { opacity: .3; cursor: not-allowed; }
.row__curate-hint { font-size: 12px; color: var(--muted); }

/* Empty + errors */
.empty, .load-error { padding: clamp(48px, 8vw, 96px) 0; text-align: center; border-bottom: 1px solid var(--rule); }
.empty__title { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 300; margin-bottom: 10px; }
.empty__text { color: var(--muted); max-width: 48ch; margin: 0 auto 22px; }

/* ------------------------------------------------------------------ Colophon */

.colophon {
  border-top: 1px solid var(--ink); max-width: var(--max); margin: 0 auto;
  padding: 28px var(--gutter) 48px;
  display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 380px); gap: 20px 48px; align-items: start;
}
.colophon__brand { display: grid; gap: 10px; }
.colophon__mark { font-size: 1.6rem; font-weight: 300; letter-spacing: .02em; text-transform: uppercase; line-height: 1; }
.colophon__line { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.colophon__meta { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; font-size: 13px; }
.colophon__meta dt { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.colophon__meta dd { margin: 0; }
.colophon__note { font-size: 12px; color: var(--muted); line-height: 1.55; }

/* ------------------------------------------------------------------ Details drawer (dark) */

dialog { padding: 0; border: 0; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(10,10,10,.58); }

.drawer {
  margin: 0 0 0 auto; height: 100dvh; width: min(680px, 100vw);
  background: var(--night); color: #f1f1f1; color-scheme: dark;
  overflow-y: auto; overscroll-behavior: contain;
}
.drawer[open] { animation: slide-in .42s var(--ease) both; }
.drawer[open]::backdrop { animation: fade .3s ease both; }

.drawer__inner { min-height: 100%; display: flex; flex-direction: column; }
.drawer__bar {
  position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px 8px var(--gutter); background: rgba(11,11,11,.92);
  border-bottom: 1px solid var(--night-rule);
  backdrop-filter: blur(6px);
}
.drawer__bar p { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--night-muted); }
.drawer__media { position: relative; aspect-ratio: 16 / 9; background: #000; color: #fff; overflow: hidden; }
.drawer__media img, .drawer__media video, .drawer__media iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.drawer__media video, .drawer__media iframe { object-fit: contain; }
.drawer__media .slate { position: absolute; inset: 0; }
.drawer__content { padding: 26px var(--gutter) 40px; display: flex; flex-direction: column; gap: 22px; }
.drawer__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -8px; }
.drawer__tags .tag { color: #fff; }
.drawer__tags .tag--ed { color: var(--bronze); }
.drawer__title { margin: 0; font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 600; line-height: 1.08; letter-spacing: -.02em; overflow-wrap: anywhere; }
.drawer__credit { margin-top: -10px; font-size: 16px; color: #fff; }
.drawer__facts-line { margin-top: -14px; font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--night-muted); }
.drawer__facts-line span + span::before { content: "·"; margin: 0 .6em; }
.drawer__section .drawer__lede { font-size: 17px; font-weight: 300; line-height: 1.55; color: #fff; }
.drawer__orig { font-size: 14px; color: var(--night-muted); border-left: 1px solid #4a4a4a; padding-left: 14px; overflow-wrap: anywhere; }
.drawer__orig b { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #fff; margin-bottom: 4px; }
.drawer__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.drawer__actions .save-btn { min-height: 40px; padding: 0 14px; border: 1px solid rgba(255,255,255,.5); color: #fff; }
.drawer__actions .save-btn svg { width: 16px; height: 16px; }
.drawer__actions .save-btn span { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }

.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0; margin: 0; border-top: 1px solid var(--night-rule); }
.facts dt, .facts dd { padding: 11px 0; border-bottom: 1px solid var(--night-rule); margin: 0; }
.facts dt { font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--night-muted); padding-right: 22px; padding-top: 14px; }
.facts dd { font-size: 14px; overflow-wrap: anywhere; }
.facts dd small { display: block; color: var(--night-muted); font-size: 12px; }
.facts a { text-underline-offset: 3px; }

.drawer__source { margin-top: 10px; font-size: 13px; }
.drawer__section .drawer__source a { color: #fff; }
.drawer__section h3 { margin: 0 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--night-muted); }
.drawer__section p { font-size: 15px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.drawer__section .muted { color: var(--night-muted); font-style: italic; }
.drawer__section .tools { display: flex; flex-wrap: wrap; gap: 6px; }

/* ------------------------------------------------------------------ Panels (curator forms) */

.panel {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto;
  background: var(--paper); color: var(--ink); border: 1px solid var(--ink);
}
.panel[open] { animation: rise .32s var(--ease) both; }
.panel__form { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 14px; }
.panel__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.panel__title { margin: 0; font-size: 1.4rem; font-weight: 600; letter-spacing: -.01em; }
.panel__sub { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.form-row { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-row > span:first-child { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.form-row em { font-style: normal; font-weight: 500; letter-spacing: .02em; text-transform: none; color: var(--muted); margin-left: 6px; }
.form-row input, .form-row textarea, .form-row select {
  width: 100%; border: 1px solid #c9c9c9; border-radius: 0; background: #fff; color: var(--ink); padding: 10px 12px; font-size: 15px;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus { outline: 2px solid var(--ink); outline-offset: -1px; border-color: var(--ink); }
.form-row input[aria-invalid="true"] { border-color: #b3261e; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-error { font-size: 13px; color: #b3261e; font-weight: 600; min-height: 0; }
.form-error:empty { display: none; }
.panel__actions { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 20px; z-index: 60;
  transform: translate(-50%, 24px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 12px 18px; font-size: 13px; max-width: calc(100vw - 32px);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.noscript { padding: 24px var(--gutter); text-align: center; }

/* ------------------------------------------------------------------ Motion */

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes settle { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; transition-duration: .001ms !important; }
  .row__thumb:hover img, .feature__play:hover { transform: none; }
}

/* ------------------------------------------------------------------ Responsive */

@media (max-width: 1100px) {
  .row { grid-template-columns: 64px minmax(180px, 300px) minmax(0, 1fr) auto; }
  .colophon { grid-template-columns: auto 1fr; }
  .colophon__note { grid-column: 1 / -1; max-width: 70ch; }
}

@media (max-width: 760px) {
  .masthead__bar { grid-template-columns: 1fr auto; padding-top: 12px; padding-bottom: 12px; }
  .masthead__edition { display: none; }
  .wordmark { font-size: clamp(2rem, 10.5vw, 3.4rem); }
  .icon-btn--text .icon-btn__label { display: none; }
  .icon-btn { min-width: 42px; padding: 0 6px; }
  .tabs { justify-content: flex-start; gap: 22px; }
  .tabs::after { content: ""; flex: 0 0 4px; }
  .sections::after {
    content: ""; position: absolute; right: 0; top: 0; bottom: 1px; width: 28px; pointer-events: none;
    background: linear-gradient(to right, rgba(255,255,255,0), #fff);
  }

  .feature__media { min-height: 0; aspect-ratio: 4 / 3; max-height: none; }
  .feature__scrim { display: none; }
  .feature__caption { position: static; padding: 22px var(--gutter) 30px; align-items: flex-start; text-align: left; }
  .feature__play { position: absolute; left: 50%; top: calc((100vw * .75) / 2); transform: translate(-50%, -50%); margin: 0; }
  .feature__play:hover { transform: translate(-50%, -50%) scale(1.04); }
  .feature__actions { justify-content: flex-start; }

  .directory__head { grid-template-columns: 1fr; gap: 8px; }
  .directory__basis { text-align: left; }
  .toolbar { gap: 4px 16px; }
  .field--search { flex-basis: 100%; }

  .row {
    grid-template-columns: 52px minmax(0, 1fr) auto;
    grid-template-areas: "thumb thumb thumb" "rank body actions";
    gap: 0 12px;
  }
  .row__thumb { margin-bottom: 14px; }
  .row__num { font-size: 2rem; }
  .curator-bar__switch { flex: 1 1 100%; }
  .curator-bar__switch .btn { flex: 1 1 0; }
  .row__curate { grid-column: 1 / -1; }
  .row__actions .icon-btn { min-width: 42px; height: 42px; }

  .curator-bar__actions .btn { flex: 1 1 auto; }
  .colophon { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .drawer { width: 100vw; }
  .facts { grid-template-columns: 1fr; }
  .facts dt { border-bottom: 0; padding-bottom: 0; }
}

@media (max-width: 380px) {
  .icon-btn { min-width: 38px; padding: 0 4px; }
  .wordmark { font-size: 9.6vw; }
}
