/* ==========================================================================
   Voci originali — "Programma di sala"
   A night at an old single-screen cinema. Dark auditorium by default,
   printed-programme paper in light mode. One accent: projector-bulb amber.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  color-scheme: dark;

  /* Colour */
  --bg: #13100e;
  --surface: #1c1814;
  --surface-raised: #241f19;
  --ink: #efe6d6;
  --muted: #a89d8c;
  --line: #3a322a;
  --line-strong: #5a4e40;
  --accent: #e8a33d;
  --accent-soft: rgba(232, 163, 61, 0.14);
  --on-accent: #1a1208;
  --ok: #9bb48a;
  --error: #e0806a;
  --unknown: #d3a65c;
  --grain-opacity: 0.07;

  /* Inline SVG assets (colour must be baked in, so they live with the theme) */
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23efe6d6' stroke-width='1.6'/%3E%3C/svg%3E");
  --check-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.5l3 3 6-7' fill='none' stroke='%231a1208' stroke-width='2'/%3E%3C/svg%3E");
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .95 0 0 0 0 .85 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");

  /* Type families */
  --font-display: "Bahnschrift", "DIN Alternate", "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Type scale */
  --fs-label: 0.75rem;     /* 12 */
  --fs-small: 0.875rem;    /* 14 */
  --fs-body: 1rem;         /* 16 */
  --fs-lead: 1.25rem;      /* 20 */
  --fs-title: 1.75rem;     /* 28 */
  --fs-display: 2.75rem;   /* 44 */
  --fs-hero: clamp(3.25rem, 9vw, 6rem);
  --tracking-label: 0.12em;

  /* Spacing */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 72px;
  --gutter: 16px;
  --page-max: 1280px;

  /* Shape */
  --radius: 5px;
  --hit: 44px;
  --stub-time: 120px;
  --stub-place: 280px;
  --notch: 18px;
  --perf: color-mix(in srgb, var(--ink) 30%, transparent);
  --finder-h: 0px;
}

@media (min-width: 640px) {
  :root { --gutter: 32px; }
}

@media (min-width: 1024px) {
  :root { --gutter: 48px; }
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f3ecdf;
    --surface: #faf5ea;
    --surface-raised: #fffcf5;
    --ink: #1d1915;
    --muted: #5e5446;
    --line: #d6cbb7;
    --line-strong: #a89b84;
    --accent: #a3561a;
    --accent-soft: rgba(163, 86, 26, 0.1);
    --on-accent: #fff9ee;
    --ok: #3f6b45;
    --error: #9c3a24;
    --unknown: #7a5413;
    --grain-opacity: 0.1;
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231d1915' stroke-width='1.6'/%3E%3C/svg%3E");
    --check-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.5l3 3 6-7' fill='none' stroke='%23fff9ee' stroke-width='2'/%3E%3C/svg%3E");
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .22 0 0 0 0 .12 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  }
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--finder-h) + var(--s-5));
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--fs-body) / 1.55 var(--font-body);
  overflow-wrap: break-word;
}

/* Film grain: fixed, tiny, non-interactive */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: var(--grain);
  opacity: var(--grain-opacity);
  pointer-events: none;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.5;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.skip {
  position: absolute;
  top: -80px;
  left: var(--s-4);
  z-index: 20;
  padding: var(--s-3) var(--s-4);
  background: var(--accent);
  color: var(--on-accent);
  font: 700 var(--fs-label) / 1 var(--font-display);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  text-decoration: none;
}

.skip:focus {
  top: var(--s-4);
}

.page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Shared "marquee" label voice */
.brand,
.radius,
.edition,
.lang-option,
.primary,
.tab,
.day-heading,
.badge,
label,
#updated,
#result-count,
.source-status,
.coverage-heading > span {
  font-family: var(--font-display);
  font-stretch: 75%;
  font-variation-settings: "wdth" 75;
}

/* --------------------------------------------------------------------------
   3. Masthead
   -------------------------------------------------------------------------- */
.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2) var(--s-4);
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.reel {
  color: var(--accent);
  font-size: var(--fs-lead);
  line-height: 1;
}

.masthead-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--s-4);
  margin-left: auto;
}

.radius {
  color: var(--muted);
  font-size: var(--fs-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

/* Language switch: compact segmented control */
.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
}

.lang-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 4px 10px;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1;
}

.lang-option + .lang-option {
  border-left: 1px solid var(--line-strong);
}

.lang-option:hover {
  color: var(--ink);
}

.lang-option[aria-pressed="true"] {
  background: var(--accent);
  color: var(--on-accent);
}

.lang-option:focus-visible {
  outline-offset: -3px;
  position: relative;
  z-index: 1;
}

.lang-flag {
  display: block;
  flex: 0 0 auto;
  width: 16px;
  height: 11px;
  border-radius: 1px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
}

/* --------------------------------------------------------------------------
   4. Intro
   -------------------------------------------------------------------------- */
.intro {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  padding: var(--s-7) 0 var(--s-6);
}

.edition {
  margin-bottom: var(--s-3);
  color: var(--accent);
  font-size: var(--fs-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

h1 {
  margin-bottom: var(--s-4);
  font: 400 var(--fs-hero) / 0.95 var(--font-serif);
  letter-spacing: -0.035em;
}

h1 .title-dot {
  color: var(--accent);
}

.description {
  max-width: 34em;
  color: var(--muted);
  font-size: var(--fs-body);
  line-height: 1.6;
}

.update-block {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--s-3);
}

#updated {
  color: var(--muted);
  font-size: var(--fs-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (min-width: 760px) {
  .intro {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--s-7);
    padding: var(--s-8) 0 var(--s-6);
  }

  .update-block {
    flex: 0 0 240px;
    align-items: flex-end;
    text-align: right;
  }

  .update-block .primary {
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: var(--hit);
  padding: 8px var(--s-4);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--on-accent);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
  transition: background-color 0.15s, color 0.15s;
}

.primary:hover:not(:disabled) {
  background: transparent;
  color: var(--accent);
}

.primary .icon {
  font-size: 1.25em;
  line-height: 1;
}

.primary .button-label {
  font-size: inherit;
  font-weight: inherit;
}

/* --------------------------------------------------------------------------
   6. Finder (sticky control strip)
   -------------------------------------------------------------------------- */
/* Sticky only where it is a single slim strip (>=1024px) */
.finder {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
  margin: 0 calc(var(--gutter) * -1);
  padding: var(--s-3) var(--gutter);
  background: var(--bg);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.finder > div {
  min-width: 0;
}

label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

input[type="search"],
select {
  width: 100%;
  min-height: var(--hit);
  padding: 8px var(--s-3);
  background-color: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: var(--fs-body);
}

input[type="search"]::placeholder {
  color: var(--muted);
  opacity: 0.8;
}

input[type="search"]:focus,
select:focus {
  border-color: var(--accent);
}

input[type="search"]:focus-visible,
select:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 1px var(--accent);
}

select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 36px;
  background-image: var(--select-arrow);
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 11px 7px;
  text-overflow: ellipsis;
}

select option {
  background: var(--surface);
  color: var(--ink);
}

/* Custom checkbox */
.check {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-height: var(--hit);
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-variation-settings: normal;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

.check input {
  flex: 0 0 auto;
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  margin: 0;
  background: var(--surface) center / 14px 14px no-repeat;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  cursor: pointer;
}

.check input:checked {
  background-color: var(--accent);
  background-image: var(--check-mark);
  border-color: var(--accent);
}

@media (min-width: 640px) and (max-width: 1023px) {
  .finder {
    grid-template-columns: 1fr 1fr;
  }

  .finder .search-field,
  .finder .check {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  :root { --finder-h: 96px; }

  .finder {
    position: sticky;
    top: 0;
    grid-template-columns: minmax(200px, 1fr) 190px 220px auto;
    align-items: end;
    gap: var(--s-4);
  }

  .finder .check {
    white-space: nowrap;
  }
}

/* --------------------------------------------------------------------------
   7. Tabs and result summary
   -------------------------------------------------------------------------- */
.results-top {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  margin-top: var(--s-6);
  border-bottom: 1px solid var(--line);
}

.tabs {
  display: flex;
  gap: var(--s-5);
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 48px;
  margin-bottom: -1px;
  padding: 8px 0;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tab > span:last-child {
  min-width: 28px;
  white-space: nowrap;
  padding: 1px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: var(--fs-label);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  text-align: center;
}

.tab:hover {
  color: var(--ink);
}

.tab.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.tab.active > span:last-child {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

/* Must come after the base .tab rules so it wins the cascade. */
@media (max-width: 479px) {
  .tabs { gap: var(--s-4); }

  .tab {
    gap: 6px;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
  }

  .tab > span:last-child { min-width: 24px; padding: 1px 5px; }
}

#result-count {
  color: var(--muted);
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

@media (min-width: 640px) {
  .results-top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
  }

  #result-count {
    text-align: right;
  }
}

.mode-note {
  margin: var(--s-4) 0 var(--s-2);
  color: var(--muted);
  font-size: var(--fs-small);
}

.load-status {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin: var(--s-3) 0 0;
  padding: var(--s-3) var(--s-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: var(--fs-small);
}

.load-status::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: projector 2.4s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   8. Results: day headings and ticket-stub screenings
   -------------------------------------------------------------------------- */
.results {
  min-height: 180px;
  scroll-margin-top: calc(var(--finder-h) + var(--s-5));
}

.day-heading {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  margin: var(--s-7) 0 var(--s-4);
  scroll-margin-top: calc(var(--finder-h) + var(--s-5));
  color: var(--ink);
  font-size: var(--fs-lead);
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.day-heading::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
}

.results > .day-heading:first-child {
  margin-top: var(--s-5);
}

/* The stub. Mobile first: time on top, horizontal perforation. */
.screening {
  --row-time: 56px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0 0 var(--s-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  scroll-margin-top: calc(var(--finder-h) + var(--s-5));
  transition: border-color 0.2s, transform 0.2s;
}

.screening:hover,
.screening:focus-within {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
  transform: translateY(-1px);
}

/* Notches: circles in page colour, only their inner halves are visible */
.screening::before,
.screening::after {
  content: "";
  position: absolute;
  z-index: 1;
  width: var(--notch);
  height: var(--notch);
  background: var(--bg);
  border: 1px solid var(--perf);
  border-radius: 50%;
  pointer-events: none;
  transition: border-color 0.2s;
}

.screening:hover::before,
.screening:hover::after,
.screening:focus-within::before,
.screening:focus-within::after {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
}

.screening::before {
  top: calc(var(--row-time) - var(--notch) / 2);
  left: calc(var(--notch) / -2 - 1px);
}

.screening::after {
  top: calc(var(--row-time) - var(--notch) / 2);
  right: calc(var(--notch) / -2 - 1px);
}

.screening-time {
  display: flex;
  align-items: center;
  height: var(--row-time);
  padding: 0 var(--s-4);
  border-bottom: 1px dashed var(--perf);
  color: var(--accent);
  font: 600 2.25rem / 1 var(--font-display);
  font-stretch: 75%;
  font-variation-settings: "wdth" 75;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.screening-info {
  min-width: 0;
  padding: var(--s-4);
}

.screening h3 {
  margin-bottom: var(--s-2);
  font: 400 var(--fs-title) / 1.15 var(--font-serif);
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.screening-place {
  min-width: 0;
  padding: 0 var(--s-4) var(--s-4);
}

@media (min-width: 760px) {
  .screening {
    grid-template-columns: var(--stub-time) minmax(0, 1fr) var(--stub-place);
  }

  /* Vertical perforation with notches top and bottom */
  .screening::before,
  .screening::after {
    right: auto;
    left: calc(var(--stub-time) - var(--notch) / 2);
  }

  .screening::before {
    top: calc(var(--notch) / -2 - 1px);
  }

  .screening::after {
    top: auto;
    bottom: calc(var(--notch) / -2 - 1px);
  }

  .screening-time {
    height: auto;
    align-items: flex-start;
    padding: var(--s-5) var(--s-4);
    border-right: 1px dashed var(--perf);
    border-bottom: 0;
    font-size: 2.5rem;
  }

  .screening-info {
    padding: var(--s-5);
  }

  .screening-place {
    padding: var(--s-5) var(--s-5) var(--s-5) 0;
  }
}

@media (min-width: 760px) and (max-width: 1023px) {
  .screening {
    grid-template-columns: var(--stub-time) minmax(0, 1fr);
  }

  .screening-place {
    grid-column: 2;
    padding: 0 var(--s-5) var(--s-5);
  }
}

/* Badges and language */
.badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--ok);
  border-radius: 3px;
  color: var(--ok);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
}

.badge.unknown {
  border-color: var(--unknown);
  color: var(--unknown);
}

/* TMDB block */
.tmdb {
  max-width: 40em;
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px solid var(--line);
}

.tmdb-rating {
  margin-bottom: 6px;
  color: var(--ink);
  font: 600 var(--fs-small) / 1.2 var(--font-display);
  font-stretch: 75%;
  font-variation-settings: "wdth" 75;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tmdb-plot {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.55;
}

.tmdb-note {
  margin-top: 6px;
  color: var(--muted);
  font: italic 400 var(--fs-label) / 1.4 var(--font-serif);
}

/* Place and actions */
.place-name {
  font: 600 var(--fs-body) / 1.3 var(--font-body);
}

.place-meta {
  margin-bottom: var(--s-3);
  color: var(--muted);
  font-size: var(--fs-small);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-1) var(--s-4);
}

.actions a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--hit);
  color: var(--muted);
  font-size: var(--fs-small);
  text-decoration: none;
}

.actions a:not(.ticket):not(:last-child)::after {
  content: "→";
  transition: transform 0.15s;
}

.actions a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.actions a:not(.ticket):not(:last-child):hover::after {
  transform: translateX(3px);
}

.actions a.ticket {
  padding: 0 var(--s-4);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--on-accent);
  font: 700 var(--fs-small) / 1 var(--font-display);
  font-stretch: 75%;
  font-variation-settings: "wdth" 75;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background-color 0.15s, color 0.15s;
}

.actions a.ticket:hover {
  background: transparent;
  color: var(--accent);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   9. Notices, empty and loading states
   -------------------------------------------------------------------------- */
.notice {
  max-width: 36rem;
  margin: var(--s-7) auto;
  padding: var(--s-6) var(--s-4);
  text-align: center;
}

.notice h2 {
  margin-bottom: var(--s-3);
  font: 400 var(--fs-title) / 1.2 var(--font-serif);
}

.notice p {
  margin: 0 auto;
  color: var(--muted);
  font-size: var(--fs-body);
}

.notice button {
  margin-top: var(--s-5);
}

.loading-dot {
  display: block;
  width: 12px;
  height: 12px;
  margin: 0 auto var(--s-4);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px 4px var(--accent-soft);
  animation: projector 2.4s ease-in-out infinite;
}

@keyframes projector {
  0%,
  100% { opacity: 1; }
  50% { opacity: 0.25; }
}

/* --------------------------------------------------------------------------
   10. Coverage / sources
   -------------------------------------------------------------------------- */
.coverage {
  margin-top: var(--s-8);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
}

.coverage-heading {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.coverage h2 {
  font: 400 var(--fs-title) / 1.2 var(--font-serif);
  letter-spacing: -0.01em;
}

.coverage-heading > span {
  color: var(--muted);
  font-size: var(--fs-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.coverage-description {
  max-width: 44em;
  margin: var(--s-3) 0 var(--s-5);
  color: var(--muted);
  font-size: var(--fs-small);
}

.source-list {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: var(--s-6);
}

.source {
  padding: var(--s-3) 0;
  border-top: 1px solid var(--line);
}

.source-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-4);
}

.source-name {
  font-size: var(--fs-body);
  font-weight: 600;
}

.source-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ok);
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.source-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.source-status.manual {
  color: var(--unknown);
}

.source-status.error {
  color: var(--error);
}

.source p {
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--fs-small);
}

.source a {
  display: inline-flex;
  align-items: center;
  min-height: var(--hit);
  font-size: var(--fs-small);
}

.manual-sources {
  margin-top: var(--s-8);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
}

.manual-sources h2 {
  font: 400 var(--fs-title) / 1.2 var(--font-serif);
  letter-spacing: -0.01em;
}

.manual-sources[hidden] {
  display: none;
}

.data-notes p {
  margin-top: var(--s-3);
  color: var(--muted);
  font-size: var(--fs-label);
}

@media (min-width: 760px) {
  .coverage-heading {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--s-5);
  }

  .source-list {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .source-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */
footer {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  margin-top: var(--s-7);
  padding: var(--s-5) 0 var(--s-6);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--fs-label);
  line-height: 1.5;
}

footer p {
  max-width: 36rem;
}

.tmdb-credit {
  margin-top: 0;
  font-size: var(--fs-label);
}

@media (min-width: 760px) {
  footer {
    flex-direction: row;
    justify-content: space-between;
    gap: var(--s-6);
  }
}

/* --------------------------------------------------------------------------
   12. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .screening:hover,
  .screening:focus-within,
  .actions a:hover::after {
    transform: none;
  }
}
