/* Archivo by Omnibus-Type, SIL Open Font License (see fonts/OFL.txt) */
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo.woff") format("woff");
  font-weight: 400 800;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

/* Logo font: Bricolage Grotesque, SIL Open Font License (see fonts/OFL-bricolage.txt) */
@font-face {
  font-family: "Bricolage Logo";
  src: url("fonts/bricolage-logo.woff") format("woff");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #000000;
  --text: #ececec;
  --bright: #ffffff;
  --muted: #8d8d8d;
  --faint: #5a5a5a;
  --line: #1e1e1e;
  --field: #141414;
  --field-line: #2a2a2a;
  --up: #3dd47a;
  --down: #ff4848;
  --font: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; width: 100%; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--bright); }
p a, .prose a, .vote-note a, .empty a { text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; }
p a:hover { text-decoration-color: currentColor; }

img { display: block; max-width: 100%; }

h1, h2 { margin: 0; color: var(--bright); }
h1 { font-size: 32px; line-height: 1.1; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 15px; line-height: 1.3; font-weight: 600; }

:focus-visible { outline: 2px solid var(--bright); outline-offset: 2px; border-radius: 2px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.muted { color: var(--muted); }
.faint { color: var(--faint); }

/* Header */

.site-header { border-bottom: 1px solid var(--line); position: relative; z-index: 10; }

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}

.brand {
  font-family: "Bricolage Logo", var(--font);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.012em;
  line-height: 1;
  color: var(--bright);
  white-space: nowrap;
}

.search { position: relative; flex: 1; max-width: 380px; margin-left: auto; }

input[type="search"],
input[type="text"],
input[type="password"] {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--field-line);
  border-radius: 4px;
  background: var(--field);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
input::placeholder { color: var(--faint); }
input:focus { outline: none; border-color: var(--muted); }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

.account { display: flex; align-items: center; gap: 18px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.account .strong { color: var(--bright); font-weight: 600; }
.account .who { color: var(--text); }
.account form { margin: 0; }

button.link {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
button.link:hover { color: var(--bright); }

/* Search suggestions */

.suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #101010;
  border: 1px solid var(--field-line);
  border-radius: 6px;
  padding: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
}
.suggest a {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 14px;
}
.suggest a.is-active,
.suggest a:hover { background: #1d1d1d; color: var(--bright); }
.suggest img, .suggest .no-photo { width: 28px; height: 42px; object-fit: cover; border-radius: 2px; background: #1a1a1a; }
.suggest .score { font-size: 18px; }
.suggest .suggest-all { display: block; padding: 8px; font-size: 13px; color: var(--muted); }
.suggest .suggest-empty { padding: 10px 8px; font-size: 13px; color: var(--muted); }

/* Scores */

.score {
  font-variation-settings: "wdth" 70;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 1;
}
.is-up { color: var(--up); }
.is-down { color: var(--down); }
.is-even { color: var(--muted); }

.change { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* New releases */

.releases { padding: 40px 0 8px; }
.releases h2 { margin-bottom: 16px; }

.release-strip {
  list-style: none;
  margin: 0;
  padding: 0 0 12px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 160px;
  gap: 20px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}
.release-strip li { min-width: 0; }

.release { display: block; }
.poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  height: auto;
  object-fit: cover;
  border-radius: 3px;
  background: #111;
  margin-bottom: 10px;
}
.release:hover .poster { filter: brightness(1.12); }
.release-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.release-head .name { font-weight: 600; font-size: 14px; line-height: 1.25; color: var(--bright); }
.release-head .score { font-size: 26px; }
.release .sub { display: block; font-size: 13px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.release .sub.faint { color: var(--faint); }

/* Home layout */

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 64px;
  padding: 40px 0 64px;
  align-items: start;
}

.board-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.board-head h1 { font-size: 24px; }

.sort { display: flex; gap: 18px; font-size: 14px; color: var(--muted); }
.sort a[aria-current] { color: var(--bright); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }

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

.row-link {
  display: grid;
  grid-template-columns: 28px 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.row-link.no-rank { grid-template-columns: 40px minmax(0, 1fr) auto; }

.rank { text-align: right; color: var(--faint); font-size: 13px; font-variant-numeric: tabular-nums; }
.thumb, .no-photo.thumb {
  width: 40px;
  height: 60px;
  object-fit: cover;
  border-radius: 2px;
  background: #151515;
}
.row-text { min-width: 0; display: flex; flex-direction: column; }
.row-text .name { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-text .sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-text .year { color: var(--faint); }
.row-link:hover .name { color: var(--bright); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--faint); }

.row-score { display: flex; align-items: baseline; gap: 12px; }
.row-score .score { font-size: 26px; min-width: 2.6ch; text-align: right; }

.empty { color: var(--muted); padding: 32px 0; }

.pager { display: flex; gap: 24px; align-items: center; padding: 20px 0 0; font-size: 14px; }
.pager a { color: var(--bright); font-weight: 600; }

/* Coming up */

.coming h2 { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.coming-list { list-style: none; margin: 0; padding: 0; }
.coming-list li {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.35;
}
.coming-date { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.coming-text { min-width: 0; display: flex; flex-direction: column; }
.coming-text .title { color: var(--text); }
.coming-text .sub { color: var(--muted); font-size: 13px; }

/* Filmmaker page */

.profile {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 56px;
  padding: 48px 0 72px;
  align-items: start;
}
.portrait, .no-photo.portrait {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 4px;
  background: #111;
}
.profile-photo { position: sticky; top: 24px; }
.profile-main { max-width: 640px; }
.profile h1 { font-size: 40px; }

.big-score { display: flex; align-items: flex-end; gap: 20px; margin: 20px 0 8px; }
.score-xl {
  font-size: clamp(96px, 13vw, 156px);
  font-variation-settings: "wdth" 62;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 0.82;
}
.big-score-side { display: flex; flex-direction: column; gap: 2px; padding-bottom: 6px; font-size: 13px; }
.big-score-side .change { font-size: 15px; }

.history { display: flex; align-items: flex-start; gap: 28px; margin: 24px 0 0; }
.history-graph { margin: 0; flex: 1 1 auto; max-width: 420px; min-width: 0; }
.history-release { margin: 0; flex: 0 1 220px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 1.35; padding-top: 2px; }
.history-release strong { color: var(--bright); font-weight: 600; }
.history-release .muted { font-size: 13px; }
.history.no-graph { margin-top: 16px; }
.spark { display: block; width: 100%; height: 64px; overflow: visible; }
.spark-mark { stroke: #4a4a4a; stroke-width: 1; vector-effect: non-scaling-stroke; }
.spark-line { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark-zero { stroke: #2b2b2b; stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.history figcaption { font-size: 12px; margin-top: 6px; }


.vote { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid var(--field-line);
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.vote-btn svg { width: 10px; height: 10px; fill: currentColor; }
.vote-btn.up:hover:not(:disabled) { border-color: var(--up); color: var(--up); }
.vote-btn.down:hover:not(:disabled) { border-color: var(--down); color: var(--down); }
.vote-btn:disabled { cursor: default; opacity: 0.35; }
.vote-btn.is-chosen { opacity: 1; }
.vote-btn.up.is-chosen { border-color: var(--up); color: var(--up); }
.vote-btn.down.is-chosen { border-color: var(--down); color: var(--down); }
.vote-note { margin: 12px 0 0; font-size: 13px; min-height: 20px; }

.films { margin-top: 48px; }
.films h2 { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.film-list { list-style: none; margin: 0; padding: 0; }
.film-list li {
  display: flex;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.film-year { flex: 0 0 40px; color: var(--muted); font-variant-numeric: tabular-nums; }
.film-title { flex: 1; min-width: 0; }
.film-date { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.film-kind { color: var(--faint); font-size: 12px; margin-left: 6px; }
.film-role { color: var(--muted); white-space: nowrap; font-size: 13px; }
.series-list .film-year { flex-basis: 84px; }
.series-list li { align-items: baseline; }

.boost { margin: 24px 0 0; font-size: 14px; color: var(--text); }
.boost strong { color: var(--bright); font-weight: 700; }
.boost + .vote { margin-top: 12px; }

.bump { animation: bump 0.45s ease-out; }
@keyframes bump {
  from { opacity: 0.25; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Forms and pages */

.auth { max-width: 380px; margin: 0 auto; padding: 64px 0 80px; }
.auth h1 { margin-bottom: 8px; }
.auth > p { font-size: 14px; }

.form { display: flex; flex-direction: column; gap: 16px; margin: 24px 0; }
.form label, .inline-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.hint { font-size: 12px; color: var(--faint); }
.form-error { color: var(--down); font-size: 14px; margin: 16px 0 0; }
.notice { color: var(--text); background: #111; border-left: 2px solid var(--muted); padding: 10px 14px; font-size: 14px; }

.button {
  height: 40px;
  padding: 0 18px;
  border: 1px solid var(--field-line);
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.button:hover { border-color: var(--muted); color: var(--bright); }
.button.primary { background: var(--text); border-color: var(--text); color: #000; }
.button.primary:hover { background: var(--bright); }

.prose { max-width: 640px; padding: 56px 0 80px; }
.prose h1 { margin-bottom: 24px; }
.prose h2 { margin: 36px 0 10px; }
.prose p { color: #c9c9c9; margin: 0 0 14px; }
.tmdb-logo { height: 18px; width: auto; }

.search-page { padding: 40px 0 72px; max-width: 760px; }

/* Owner page */

.admin { padding: 40px 0 80px; }
.admin h1 { margin-bottom: 20px; }
.admin h2 { margin: 40px 0 12px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 24px 0; }
.stats div { border-top: 1px solid var(--line); padding-top: 10px; }
.stats dt { font-size: 13px; color: var(--muted); }
.stats dd { margin: 2px 0 0; font-size: 24px; font-weight: 700; color: var(--bright); font-variant-numeric: tabular-nums; }
.admin-actions { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.inline-form { display: flex; gap: 10px; align-items: flex-end; margin: 0; }
.inline-form .grow { flex: 1; min-width: 260px; }
.admin-actions .inline-form:first-child { flex: 1; }
.filter { max-width: 320px; margin-bottom: 8px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; font-weight: 600; font-size: 13px; color: var(--muted); padding: 8px 8px 8px 0; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table .num { text-align: right; }
.admin-table .score { font-size: 20px; }
.admin-table form { margin: 0; }
.admin-table tr.is-hidden td:first-child { color: var(--faint); }
.admin-table .faint { font-size: 12px; margin-left: 6px; }
.sync-log { background: #0c0c0c; border: 1px solid var(--line); padding: 12px 14px; font-size: 13px; color: var(--muted); white-space: pre-wrap; border-radius: 4px; }

/* Accounts */

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 20;
  background: var(--text);
  color: #000;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
}
.skip:focus { top: 12px; color: #000; }

.site-notice { background: #111; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--text); }
.site-notice .wrap { padding-top: 10px; padding-bottom: 10px; }
.site-notice a { text-decoration: underline; text-underline-offset: 3px; }

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid #8e918f;
  border-radius: 4px;
  background: #131314;
  color: #e3e3e3;
  font-size: 14px;
  font-weight: 600;
}
.google-btn svg { width: 18px; height: 18px; flex: none; }
.google-btn:hover { background: #1f1f20; color: #fff; }
.setting .google-btn { display: inline-flex; }

.alt-login { margin: 24px 0 0; }
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 0; color: var(--faint); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.divider + .form { margin-top: 16px; }
.hint.center { display: block; text-align: center; margin: 10px 0 0; }
.hint a { text-decoration: underline; text-underline-offset: 2px; }

.form label.check { flex-direction: row; align-items: flex-start; gap: 10px; color: var(--text); font-size: 13px; line-height: 1.45; }
.check input { margin: 2px 0 0; width: 16px; height: 16px; accent-color: var(--text); flex: none; }
.check a { text-decoration: underline; text-underline-offset: 2px; }

input[type="email"] {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--field-line);
  border-radius: 4px;
  background: var(--field);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}

.account-page { padding: 48px 0 72px; max-width: 640px; }
.account-page > .muted { margin: 8px 0 0; font-size: 14px; }
.account-page .notice { margin-top: 20px; }
.settings { margin-top: 32px; }
.setting { border-top: 1px solid var(--line); padding: 24px 0 28px; }
.setting h2 { margin-bottom: 12px; }
.setting > p { margin: 0 0 12px; font-size: 14px; }
.setting .form-error { margin: 0 0 12px; }
.form.compact { margin: 16px 0 0; max-width: 380px; gap: 14px; }
.form.compact .button { align-self: flex-start; }
.tag { display: inline-block; margin-left: 8px; font-size: 12px; font-weight: 600; color: var(--muted); border: 1px solid var(--field-line); border-radius: 3px; padding: 1px 6px; vertical-align: 1px; }
.tag.is-up { border-color: rgba(61, 212, 122, 0.4); }
.vote-history { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.vote-history li { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.vh-dir { font-weight: 600; font-size: 13px; }
.vote-history a:hover { text-decoration: underline; text-underline-offset: 3px; }
.button.danger { border-color: rgba(255, 72, 72, 0.5); color: var(--down); }
.button.danger:hover { border-color: var(--down); color: var(--down); }
a.button { display: inline-flex; align-items: center; text-decoration: none; }

.prose ul { color: #c9c9c9; padding-left: 20px; margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose .muted { margin-top: -12px; margin-bottom: 28px; font-size: 13px; }

.todo { border: 1px solid #3a2a12; background: #120d05; border-radius: 4px; padding: 14px 18px; margin: 0 0 24px; }
.todo h2 { margin: 0 0 8px; font-size: 14px; color: #f0c674; }
.todo ul { margin: 0; padding-left: 18px; font-size: 14px; color: var(--text); }
.todo li { margin: 4px 0; }

/* Footer */

.site-footer { border-top: 1px solid var(--line); margin-top: 24px; }
.footer-inner { padding: 28px 24px 40px; font-size: 12px; color: var(--faint); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 14px; font-size: 13px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--bright); }
.footer-inner p { margin: 0 0 4px; }
.footer-inner a { color: var(--muted); }

/* Small screens */

@media (max-width: 900px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .profile { grid-template-columns: 200px minmax(0, 1fr); gap: 32px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .header-inner { flex-wrap: wrap; height: auto; padding: 14px 16px; gap: 12px 16px; }
  .account { margin-left: auto; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .account .who { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
  .releases { padding-top: 28px; }
  .release-strip { grid-auto-columns: 136px; gap: 14px; margin-right: -16px; padding-right: 16px; }
  .home-grid { padding-top: 32px; }
  .row-link { grid-template-columns: 22px 36px minmax(0, 1fr) auto; gap: 12px; }
  .row-link.no-rank { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .thumb, .no-photo.thumb { width: 36px; height: 54px; }
  .row-score { gap: 8px; }
  .row-score .score { font-size: 24px; }
  .profile { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 28px; }
  .profile-photo { position: static; width: 160px; }
  .profile h1 { font-size: 32px; }
  .history { flex-direction: column; gap: 14px; }
  .history-graph { width: 100%; max-width: none; }
  .history-release { flex-basis: auto; }
  .series-list li { flex-wrap: wrap; row-gap: 2px; }
  .series-list .film-title { flex-basis: calc(100% - 100px); }
  .series-list .film-role { margin-left: 100px; }
  .score-xl { font-size: 104px; }
  .auth { padding-top: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .bump { animation: none; }
  .vote-btn { transition: none; }
}
