:root {
    --heading-size: clamp(1.8rem, 6vw, 2.6rem);
    --title-size: clamp(1rem, 6cqw, 2.6rem);
    color-scheme: dark;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #f1f3f2;
    background: #252d30;
    font-synthesis: none;
}

* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
body { min-width: 320px; min-height: 100vh; margin: 0; line-height: 1.5; }
button, input { font: inherit; }
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #d3f2df; outline-offset: 3px; }
[hidden] { display: none !important; }
.home-main { width: min(calc(100% - 32px), 560px); min-height: 100vh; margin: 0 auto; padding: 24px 0 48px; }
.search-card { container-type: inline-size; width: 100%; }
h1 { display: flex; align-items: baseline; gap: .16em; width: 100%; min-width: 0; margin: 0; color: #c0c8c7; font-size: var(--title-size); font-weight: 400; line-height: 1.2; white-space: nowrap; }
.question-prefix, .question-ending { flex: 0 0 auto; }
.how-link { padding: 0; border: 0; color: inherit; background: transparent; font-size: inherit; font-weight: inherit; text-decoration: underline; text-decoration-color: #8d9997; text-decoration-thickness: 1px; text-underline-offset: 4px; cursor: pointer; }
.how-link:hover { text-decoration-color: currentColor; }
.question-area { position: relative; width: 100%; min-height: 2.4em; margin-bottom: 18px; }
.loading-indicator { position: absolute; top: .65em; right: 2px; width: 14px; height: 14px; border: 2px solid #657170; border-top-color: #f1f3f2; border-radius: 50%; animation: search-spin .75s linear infinite; }
@keyframes search-spin { to { transform: rotate(360deg); } }
#query { display: inline-block; flex: 0 0 auto; width: 5ch; max-width: none; min-width: 1ch; height: 1.2em; margin: 0; padding: 0 0 1px; border: 0; border-bottom: 1px solid #aab5b3; border-radius: 0; outline: 0; color: #f1f3f2; background: transparent; font: inherit; font-weight: 700; text-align: left; vertical-align: baseline; }
#query::placeholder { color: #a0aaa8; opacity: 1; }
#query:focus { border-bottom: 2px solid #d3f2df; }
#query::-webkit-search-cancel-button { display: none; }
.verdict { margin: 12px 0 0; color: #f1f3f2; font-size: var(--heading-size); font-weight: 700; line-height: 1.2; }
#verdict-answer { white-space: nowrap; }
.vote-count, .issue-link { display: block; color: #9aa4a2; font-size: 11px; font-weight: 400; line-height: 1.4; }
.vote-count { margin-bottom: 4px; }
.issue-link { width: fit-content; margin-top: 6px; }
.results-panel { width: 100%; margin-top: 12px; overflow: hidden; border: 1px solid #4b5556; background: #202729; }
.result-filters { display: flex; gap: 4px; padding: 6px 8px; border-bottom: 1px solid #3b4445; }
.result-filters button { padding: 3px 8px; border: 0; border-radius: 2px; color: #b3bcba; background: transparent; font-size: 12px; cursor: pointer; }
.result-filters button:hover, .result-filters button[aria-pressed="true"] { color: #f1f3f2; background: #3b4445; }
.movie-options { max-height: min(calc(75vh - 38px), 522px); margin: 0; padding: 0; overflow-y: auto; list-style: none; text-align: left; }
.movie-option { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: stretch; gap: 8px 14px; width: 100%; min-height: 96px; padding: 12px; cursor: pointer; }
.movie-option + .movie-option { border-top: 1px solid #3b4445; }
.movie-option:hover, .movie-option.is-active { background: #30393b; }
.movie-option-poster-frame { display: block; align-self: stretch; width: 56px; min-height: 84px; overflow: hidden; border-radius: 2px; background: #3b4445; }
.movie-option-poster { display: block; width: 100%; height: 100%; object-fit: cover; }
.movie-option-info { display: flex; flex-direction: column; align-self: stretch; min-width: 0; width: 100%; gap: 5px; }
.movie-option-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.movie-option-title { display: block; min-width: 0; font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
.movie-option-year { flex: 0 0 auto; color: #b3bcba; font-size: 12px; font-weight: 400; white-space: nowrap; }
.movie-option-overview { display: -webkit-box; min-width: 0; max-height: 4.5em; overflow: hidden; color: #c0c8c7; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.algorithm-tooltip { position: relative; display: inline-block; }
.tooltip-trigger { padding: 0; border: 0; color: inherit; background: transparent; font: inherit; text-decoration: none; cursor: help; }
.algorithm-tooltip-content { position: absolute; z-index: 5; top: calc(100% + 8px); left: 0; display: block; width: max-content; max-width: calc(100vw - 48px); padding: 12px; overflow-x: auto; border: 1px solid #424a4c; color: #f1f3f2; background: #1d2426; font-size: 13px; font-weight: 400; white-space: pre; visibility: hidden; opacity: 0; transition: opacity 100ms ease, visibility 100ms ease; }
.algorithm-tooltip:hover .algorithm-tooltip-content, .tooltip-trigger:focus-visible + .algorithm-tooltip-content { visibility: visible; opacity: 1; }
.about-dialog { width: min(600px, calc(100% - 32px)); max-width: none; max-height: min(80vh, 720px); padding: 24px; overflow-y: auto; border: 1px solid #4b5556; color: #f1f3f2; background: #252d30; }
.about-dialog::backdrop { background: rgb(0 0 0 / 72%); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.dialog-heading h2 { margin: 0; font-size: 1.5rem; line-height: 1.2; }
.about-dialog > p { margin: 0 0 16px; color: #d0d6d4; }
.dialog-close { display: grid; width: 36px; height: 36px; place-items: center; padding: 0; border: 1px solid #657170; color: #d0d6d4; background: transparent; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.dialog-close:hover { color: #f1f3f2; background: #30393b; }
.tmdb-attribution { margin-top: 24px; padding-top: 16px; border-top: 1px solid #424a4c; color: #b3bcba; font-size: 13px; }
@media (max-width: 520px) {
    .home-main { padding-top: 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
