:root {
    --bg: #080A0E;
    --bg2: #0D1017;
    --bg3: #131720;
    --bg4: #1A2030;
    --border: rgba(255,255,255,0.07);
    --border2: rgba(255,255,255,0.12);
    --gold: #C9A84C;
    --gold2: #E8C56A;
    --gold-dim: rgba(201,168,76,0.15);
    --red: #E05252;
    --green: #4CAF82;
    --blue: #4A90D9;
    --text: #E8EAF0;
    --text2: #8A90A0;
    --text3: #555D70;
    --mono: 'DM Mono', monospace;
    --sans: 'DM Sans', sans-serif;
    --display: 'Bebas Neue', sans-serif;
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  body { background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 13px; line-height: 1.5; overflow-x: hidden; }
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
    opacity: 0.4;
  }

  /* NAV */
  nav {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; height: 52px; border-bottom: 1px solid var(--border);
    background: rgba(8,10,14,0.95); position: sticky; top: 0; z-index: 100;
    backdrop-filter: blur(12px);
  }
  .nav-logo { font-family: var(--display); font-size: 22px; letter-spacing: 0.08em; color: var(--gold2); }
  .nav-logo span { color: var(--text3); font-size: 13px; font-family: var(--mono); letter-spacing: 0; margin-left: 8px; font-weight: 300; }
  .nav-links { display: flex; gap: 28px; }
  .nav-links a { color: var(--text2); text-decoration: none; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500; transition: color 0.2s; }
  .nav-links a:hover, .nav-links a.active { color: var(--text); }
  .nav-links a.active { color: var(--gold); }
  .nav-search { background: var(--bg3); border: 1px solid var(--border); border-radius: 4px; padding: 6px 12px; color: var(--text2); font-family: var(--mono); font-size: 11px; width: 200px; outline: none; }
  .nav-search:focus { border-color: var(--border2); color: var(--text); }
  .nav-search::placeholder { color: var(--text3); }

  /* TICKER */
  .ticker { background: var(--bg2); border-bottom: 1px solid var(--border); padding: 6px 0; overflow: hidden; white-space: nowrap; }
  .ticker-inner { display: inline-flex; gap: 40px; animation: ticker 60s linear infinite; }
  .ticker-item { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; color: var(--text2); }
  .ticker-item .title { color: var(--text); font-weight: 500; }
  .ticker-item .up { color: var(--green); }
  .ticker-item .neutral { color: var(--gold); }
  @keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

  /* LAYOUT */
  .layout { display: grid; grid-template-columns: 230px 1fr; height: calc(100vh - 108px); }

  /* SIDEBAR LEFT */
  .sidebar-left { border-right: 1px solid var(--border); overflow-y: auto; background: var(--bg2); display: flex; flex-direction: column; }
  .sidebar-left::-webkit-scrollbar { width: 3px; }
  .sidebar-left::-webkit-scrollbar-thumb { background: var(--border2); }

  /* SIDEBAR FILTER BAR */
  .sidebar-filters { flex-shrink: 0; padding: 8px 10px; border-bottom: 1px solid var(--border); background: var(--bg2); display: flex; flex-direction: column; gap: 6px; }
  .filter-row { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
  .filter-chip { background: var(--bg3); border: 1px solid var(--border); border-radius: 3px; color: var(--text3); font-family: var(--mono); font-size: 9px; padding: 3px 7px; cursor: pointer; transition: all 0.15s; letter-spacing: 0.04em; white-space: nowrap; }
  .filter-chip:hover { color: var(--text2); border-color: var(--border2); }
  .filter-chip.active { background: var(--gold-dim); border-color: rgba(201,168,76,0.3); color: var(--gold2); }
  .filter-chip.sort-active { background: rgba(74,144,217,0.1); border-color: rgba(74,144,217,0.2); color: var(--blue); }
  .filter-label { font-size: 8px; color: var(--text3); font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.1em; margin-right: 2px; flex-shrink: 0; }
  #filmListScroll { flex: 1; overflow-y: auto; }
  #filmListScroll::-webkit-scrollbar { width: 3px; }
  #filmListScroll::-webkit-scrollbar-thumb { background: var(--border2); }
  .section-label { padding: 14px 16px 8px; font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text3); font-weight: 500; font-family: var(--mono); }

  .film-row { display: flex; align-items: center; gap: 10px; padding: 8px 16px; cursor: pointer; transition: background 0.15s; border-left: 2px solid transparent; }
  .film-row:hover { background: var(--bg3); }
  .film-row.active { background: var(--bg3); border-left-color: var(--gold); }
  .film-row.pinned { border-left-color: var(--gold2); }
  .film-row-poster { width: 28px; height: 40px; border-radius: 2px; object-fit: cover; background: var(--bg4); flex-shrink: 0; overflow: hidden; }
  .film-row-poster img { width: 100%; height: 100%; object-fit: cover; }
  .film-row-info { flex: 1; min-width: 0; }
  .film-row-title { font-size: 12px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .film-row-date { font-size: 10px; color: var(--text3); font-family: var(--mono); }
  .film-row-hype { font-size: 11px; font-family: var(--mono); font-weight: 500; }
  .hype-high { color: var(--gold2); }
  .hype-med { color: var(--text2); }
  .hype-low { color: var(--text3); }
  .pin-btn { background: none; border: none; cursor: pointer; padding: 2px 0 2px 4px; color: var(--text3); font-size: 11px; line-height: 1; flex-shrink: 0; opacity: 0; transition: opacity 0.15s, color 0.15s; }
  .film-row:hover .pin-btn { opacity: 1; }
  .pin-btn.pinned { opacity: 1; color: var(--gold2); }
  .pin-btn:hover { color: var(--gold); }

  /* SKELETON LOADER */
  .skeleton { background: linear-gradient(90deg, var(--bg3) 25%, var(--bg4) 50%, var(--bg3) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 3px; }
  @keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

  /* MAIN */
  .main { overflow-y: auto; background: var(--bg); }
  .main::-webkit-scrollbar { width: 3px; }
  .main::-webkit-scrollbar-thumb { background: var(--border2); }

  /* LOADING STATE */
  .loading-state { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 300px; gap: 12px; }
  .loading-spinner { width: 24px; height: 24px; border: 2px solid var(--border2); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.8s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }
  .loading-text { font-family: var(--mono); font-size: 11px; color: var(--text3); }

  /* FILM HERO */
  .film-hero { position: relative; padding: 32px 32px 24px; border-bottom: 1px solid var(--border); overflow: hidden; animation: fadeIn 0.3s ease; }
  @keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
  .film-hero-bg { position: absolute; inset: 0; pointer-events: none; }
  .film-hero-backdrop { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(40px) brightness(0.15); transform: scale(1.1); }
  .film-hero-overlay { position: absolute; inset: 0; background: linear-gradient(105deg, rgba(8,10,14,0.85) 0%, rgba(8,10,14,0.6) 100%); }
  .film-hero-top { display: flex; gap: 24px; align-items: flex-start; position: relative; }
  .film-poster-large { width: 110px; height: 162px; border-radius: 4px; background: var(--bg3); border: 1px solid var(--border2); flex-shrink: 0; overflow: hidden; }
  .film-poster-large img { width: 100%; height: 100%; object-fit: cover; }
  .film-poster-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; opacity: 0.2; }
  .film-hero-meta { flex: 1; }
  .film-rating-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--bg3); border: 1px solid var(--border2); border-radius: 3px; padding: 2px 8px; font-family: var(--mono); font-size: 10px; color: var(--text2); margin-bottom: 10px; }
  .film-rating-badge .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); animation: pulse 2s infinite; }
  @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
  .film-title { font-family: var(--display); font-size: 38px; line-height: 0.95; letter-spacing: 0.03em; color: var(--text); margin-bottom: 6px; }
  .film-title .year { font-size: 20px; color: var(--text3); margin-left: 6px; }
  .film-subtitle { font-size: 12px; color: var(--text2); margin-bottom: 14px; font-style: italic; }
  .film-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
  .tag { padding: 3px 8px; border-radius: 2px; font-size: 10px; font-family: var(--mono); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
  .tag-genre { background: var(--bg4); color: var(--text2); border: 1px solid var(--border); }
  .tag-format { background: rgba(74,144,217,0.12); color: var(--blue); border: 1px solid rgba(74,144,217,0.2); }
  .tag-rated { background: rgba(224,82,82,0.1); color: var(--red); border: 1px solid rgba(224,82,82,0.2); }
  .tag-studio { background: var(--gold-dim); color: var(--gold); border: 1px solid rgba(201,168,76,0.2); }

  .film-hero-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; margin-top: 20px; position: relative; z-index: 1; }
  .hero-stat { background: var(--bg2); padding: 12px 14px; transition: background 0.15s; }
  .hero-stat:hover { background: var(--bg3); }
  .hero-stat-label { font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text3); font-family: var(--mono); margin-bottom: 5px; }
  .hero-stat-value { font-family: var(--mono); font-size: 17px; font-weight: 500; color: var(--text); line-height: 1; }
  .hero-stat-value.gold { color: var(--gold2); }
  .hero-stat-value.green { color: var(--green); }
  .hero-stat-sub { font-size: 9px; color: var(--text3); font-family: var(--mono); margin-top: 3px; }

  /* HYPE */
  .hype-section { padding: 20px 32px; border-bottom: 1px solid var(--border); }
  .section-title { font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text3); font-family: var(--mono); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
  .section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
  .hype-meter-wrap { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
  .hype-label-left { font-family: var(--mono); font-size: 10px; color: var(--text3); width: 60px; text-align: right; }
  .hype-bar-outer { flex: 1; height: 10px; background: var(--bg3); border-radius: 2px; border: 1px solid var(--border); overflow: hidden; }
  .hype-bar-inner { height: 100%; border-radius: 2px; transition: width 1s cubic-bezier(0.16, 1, 0.3, 1); width: 0%; }
  .hype-bar-gold { background: linear-gradient(90deg, rgba(201,168,76,0.4), var(--gold2)); box-shadow: 0 0 12px rgba(201,168,76,0.3); }
  .hype-bar-blue { background: linear-gradient(90deg, rgba(74,144,217,0.4), var(--blue)); }
  .hype-value { font-family: var(--mono); font-size: 14px; font-weight: 500; width: 36px; }
  .hype-ticks { display: flex; justify-content: space-between; padding: 0 76px; font-family: var(--mono); font-size: 9px; color: var(--text3); }

  /* DATA GRID */
  .data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border-top: 1px solid var(--border); }
  .data-panel { background: var(--bg); padding: 20px 24px; }
  .data-panel.full { grid-column: 1 / -1; }
  .film-description { font-size: 13px; color: var(--text2); line-height: 1.7; border-left: 2px solid var(--gold-dim); padding-left: 14px; margin-top: 4px; }

  /* AWARDS */
  .awards-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
  .award-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--bg2); border: 1px solid var(--border); border-radius: 3px; }
  .award-info { flex: 1; }
  .award-name { font-size: 12px; font-weight: 500; color: var(--text); }
  .award-category { font-size: 10px; color: var(--text3); font-family: var(--mono); }
  .award-prob { font-family: var(--mono); font-size: 13px; font-weight: 500; }
  .award-bar-mini { width: 60px; height: 3px; background: var(--bg4); border-radius: 2px; overflow: hidden; margin-top: 4px; }
  .award-bar-fill { height: 100%; border-radius: 2px; }
  .prob-high { color: var(--gold2); }
  .prob-med { color: var(--blue); }
  .prob-low { color: var(--text2); }

  /* FORMAT */
  .format-list { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
  .format-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-radius: 3px; border: 1px solid var(--border); background: var(--bg2); }
  .format-row.best { border-color: rgba(201,168,76,0.3); background: rgba(201,168,76,0.04); }
  .format-name { font-size: 12px; font-weight: 500; }
  .format-meta { font-size: 10px; color: var(--text3); font-family: var(--mono); }
  .format-badge { font-size: 9px; padding: 2px 7px; border-radius: 2px; font-family: var(--mono); font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; }
  .badge-best { background: var(--gold-dim); color: var(--gold2); border: 1px solid rgba(201,168,76,0.3); }
  .badge-good { background: rgba(74,144,217,0.1); color: var(--blue); border: 1px solid rgba(74,144,217,0.2); }
  .badge-ok { background: var(--bg4); color: var(--text3); border: 1px solid var(--border); }

  /* CREW */
  .crew-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 4px; }
  .crew-role { font-size: 9px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.1em; font-family: var(--mono); }
  .crew-name { font-size: 12px; font-weight: 500; color: var(--text); margin-top: 2px; }

  /* TABS */
  .tab-bar { display: flex; border-bottom: 1px solid var(--border); padding: 0 32px; background: var(--bg2); }
  .tab { padding: 10px 16px; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; font-family: var(--mono); color: var(--text3); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color 0.15s; }
  .tab:hover { color: var(--text2); }
  .tab.active { color: var(--gold); border-bottom-color: var(--gold); }

  /* BOX OFFICE PANEL (in main tab) */
  .bo-panel { background: var(--bg2); border: 1px solid var(--border); border-radius: 3px; overflow: hidden; }
  .bo-stat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--border); }
  .bo-stat { background: var(--bg2); padding: 12px 14px; }
  .bo-stat:hover { background: var(--bg3); }
  .bo-stat-label { font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text3); font-family: var(--mono); margin-bottom: 5px; }
  .bo-stat-value { font-family: var(--mono); font-size: 16px; font-weight: 500; color: var(--text); line-height: 1; }
  .bo-stat-value.gold { color: var(--gold2); }
  .bo-stat-value.green { color: var(--green); }
  .bo-stat-sub { font-size: 9px; color: var(--text3); font-family: var(--mono); margin-top: 3px; }
  .bo-bar-track { height: 6px; background: var(--bg4); border-radius: 3px; overflow: hidden; margin-top: 6px; }
  .bo-bar-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--gold-dim), var(--gold2)); transition: width 1s cubic-bezier(0.16,1,0.3,1); }
  .bo-projection-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 2px; font-family: var(--mono); font-size: 9px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; }
  .bo-proj-high { background: rgba(76,175,130,0.1); color: var(--green); border: 1px solid rgba(76,175,130,0.2); }
  .bo-proj-mid  { background: var(--gold-dim); color: var(--gold2); border: 1px solid rgba(201,168,76,0.2); }
  .bo-proj-low  { background: var(--bg4); color: var(--text3); border: 1px solid var(--border); }
  .hype-sparkline-mini { display: inline-flex; align-items: flex-end; gap: 1px; height: 18px; vertical-align: middle; margin-left: 8px; }
  .hype-sparkline-mini span { width: 3px; border-radius: 1px; display: inline-block; }

  /* COMPARE VIEW */
  .cmp-pickers { display: grid; grid-template-columns: 1fr 40px 1fr; align-items: center; gap: 10px; margin: 18px 0 16px; }
  .cmp-select { width: 100%; background: var(--bg3); border: 1px solid var(--border); border-radius: 3px;
    color: var(--text2); font-family: var(--mono); font-size: 11px; padding: 8px 10px; cursor: pointer; outline: none; }
  .cmp-select:focus { border-color: var(--border2); color: var(--text); }
  .cmp-vs { text-align: center; font-family: var(--mono); font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.1em; }
  .cmp-heads { display: grid; grid-template-columns: 1fr 40px 1fr; gap: 10px; margin-bottom: 22px; }
  .cmp-head-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 4px; padding: 16px; text-align: center; }
  .cmp-empty-card { color: var(--text3); font-family: var(--mono); font-size: 10px; padding: 34px 16px; }
  .cmp-poster { width: 72px; height: 104px; margin: 0 auto 10px; border-radius: 3px; overflow: hidden; background: var(--bg4); }
  .cmp-poster img { width: 100%; height: 100%; object-fit: cover; }
  .cmp-head-title { font-family: var(--display); font-size: 19px; letter-spacing: 0.03em; color: var(--text); line-height: 1.1; }
  .cmp-head-sub { font-family: var(--mono); font-size: 9px; color: var(--text3); margin-top: 5px; }
  .cmp-section-label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--text3); margin: 22px 0 8px; display: flex; align-items: center; gap: 8px; }
  .cmp-section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }
  .cmp-metric { display: grid; grid-template-columns: 1fr 200px 1fr; align-items: center; gap: 10px;
    padding: 7px 0; border-bottom: 1px solid var(--border); }
  .cmp-metric:last-child { border-bottom: none; }
  .cmp-cell { font-family: var(--mono); font-size: 13px; color: var(--text2); text-align: center;
    padding: 5px 8px; border-radius: 3px; border: 1px solid transparent; }
  /* The leading side is marked rather than colour-coded good/bad, since "better"
     differs per metric — a lower budget leads on leanness, not quality. */
  .cmp-cell.lead { color: var(--gold2); background: var(--gold-dim); border-color: rgba(201,168,76,0.25); font-weight: 500; }
  .cmp-none { color: var(--text3); }
  .cmp-label { text-align: center; font-size: 11px; color: var(--text3); }
  .cmp-note { display: block; font-family: var(--mono); font-size: 8px; opacity: 0.8; margin-top: 2px; }
  .cmp-prompt { padding: 40px 0; text-align: center; font-family: var(--mono); font-size: 11px; color: var(--text3); }
  .cmp-foot { font-family: var(--mono); font-size: 9px; color: var(--text3); padding: 8px 0 0; line-height: 1.6; }

  .share-btn { background: var(--bg3); border: 1px solid var(--border); color: var(--text3); font-family: var(--mono);
    font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 9px; border-radius: 3px; cursor: pointer; transition: all 0.15s; }
  .share-btn:hover { color: var(--gold2); border-color: rgba(201,168,76,0.4); background: var(--gold-dim); }
  .share-btn:focus { outline: none; }
  .share-btn:focus-visible { outline: 1px solid var(--gold); outline-offset: 1px; }

  /* AWARDS MARKET MOVERS */
  .aw-movers { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin-bottom: 6px; }
  .aw-mover { background: var(--bg2); border: 1px solid var(--border); border-radius: 4px; padding: 10px 12px;
    cursor: pointer; transition: border-color 0.15s, background 0.15s; }
  .aw-mover:hover { background: var(--bg3); border-color: var(--border2); }
  .aw-mover-cat { font-family: var(--mono); font-size: 8px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text3); }
  .aw-mover-name { font-size: 12px; color: var(--text); font-weight: 500; margin: 4px 0 6px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .aw-mover-delta { font-family: var(--mono); font-size: 16px; font-weight: 500; line-height: 1; }
  .aw-mover-pt { font-size: 9px; color: var(--text3); margin-left: 2px; }
  .aw-mover-now { font-family: var(--mono); font-size: 9px; color: var(--text3); margin-top: 4px; }
  .aw-mover-now strong { color: var(--text2); font-weight: 500; }

  /* CALIBRATION SCOREBOARD */
  .calib-summary { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--border);
    border: 1px solid var(--border); border-radius: 4px; overflow: hidden; margin: 18px 0 12px; }
  .calib-stat { background: var(--bg2); padding: 14px; text-align: center; }
  .calib-val { font-family: var(--mono); font-size: 22px; font-weight: 500; color: var(--text); line-height: 1; }
  .calib-lab { font-family: var(--mono); font-size: 8px; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--text3); margin-top: 5px; }

  /* MOVERS PANEL */
  .movers-panel { border-bottom: 1px solid var(--border); background: var(--bg2); flex-shrink: 0; }
  .movers-head { display: flex; align-items: center; gap: 8px; padding: 8px 14px; cursor: pointer;
    font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text3); }
  .movers-head:hover { color: var(--text2); }
  .movers-caret { color: var(--gold); width: 8px; }
  .movers-count { margin-left: auto; color: var(--text3); }
  .movers-body { padding: 0 0 8px; }
  .movers-group-label { font-family: var(--mono); font-size: 8px; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--text3); padding: 4px 14px 3px; opacity: 0.7; }
  .movers-row { display: grid; grid-template-columns: 1fr 44px 34px 22px; align-items: center; gap: 7px;
    padding: 4px 14px; cursor: pointer; transition: background 0.15s; }
  .movers-row:hover { background: var(--bg3); }
  .movers-title { font-size: 11px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .movers-spark { width: 44px; height: 14px; display: block; }
  .movers-delta { font-family: var(--mono); font-size: 10px; font-weight: 500; text-align: right; }
  .movers-score { font-family: var(--mono); font-size: 10px; color: var(--text3); text-align: right; }

  /* AWARDS SEASON VIEW */
  .aw-view { display: none; flex-direction: column; height: calc(100vh - 108px); background: var(--bg); overflow: hidden; }
  .aw-view.active { display: flex; }
  .aw-body { flex: 1; overflow-y: auto; padding: 22px 26px 48px; }
  .aw-body::-webkit-scrollbar { width: 3px; }
  .aw-body::-webkit-scrollbar-thumb { background: var(--border2); }
  .aw-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
  .aw-head-kicker { font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text3); margin-bottom: 6px; }
  .aw-head-title { font-family: var(--display); font-size: 30px; letter-spacing: 0.04em; color: var(--text); line-height: 1; }
  .aw-head-right { text-align: right; flex-shrink: 0; }
  .aw-year-nav { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
  .aw-year-label { font-family: var(--mono); font-size: 13px; color: var(--gold2); font-weight: 500; }
  .aw-updated { font-family: var(--mono); font-size: 9px; color: var(--text3); margin-top: 6px; }
  .aw-picker { padding: 16px 0 8px; }
  .aw-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
  .aw-chip-row-craft { margin-top: 6px; opacity: 0.8; }
  .aw-chip { background: var(--bg2); border: 1px solid var(--border); color: var(--text3); font-family: var(--mono);
    font-size: 10px; padding: 5px 10px; border-radius: 3px; cursor: pointer; transition: all 0.15s; white-space: nowrap; }
  .aw-chip:hover { color: var(--text2); border-color: var(--border2); }
  .aw-chip.active { background: var(--gold-dim); border-color: rgba(201,168,76,0.4); color: var(--gold2); }
  .aw-section-label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--text3); margin: 22px 0 10px; display: flex; align-items: center; gap: 8px; }
  .aw-section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }
  .aw-section-label-modeled { color: var(--text3); }
  .aw-modeled-note { font-family: var(--mono); font-size: 9px; line-height: 1.7; color: var(--text3); margin: -4px 0 12px; max-width: 620px; }
  .aw-list { display: flex; flex-direction: column; gap: 1px; }
  .aw-row { display: grid; grid-template-columns: 26px 34px 1fr auto; align-items: center; gap: 12px;
    padding: 10px 14px; background: var(--bg2); border-bottom: 1px solid var(--border); transition: background 0.15s; }
  .aw-row:hover { background: var(--bg3); }
  .aw-row:first-child { border-radius: 3px 3px 0 0; }
  .aw-row:last-child { border-bottom: none; border-radius: 0 0 3px 3px; }
  .aw-row-modeled { background: transparent; border-bottom: 1px solid var(--border); }
  .aw-row-modeled:hover { background: var(--bg2); }
  .aw-rank { font-family: var(--mono); font-size: 11px; color: var(--text3); text-align: right; }
  .aw-poster { width: 34px; height: 48px; border-radius: 2px; overflow: hidden; background: var(--bg4); flex-shrink: 0; }
  .aw-poster img { width: 100%; height: 100%; object-fit: cover; }
  .aw-poster-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    font-family: var(--display); font-size: 15px; color: var(--text3); }
  .aw-row-main { min-width: 0; }
  .aw-row-title { font-size: 13px; color: var(--text); font-weight: 500; margin-bottom: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .aw-row-sub { font-family: var(--mono); font-size: 9px; color: var(--text3); margin-bottom: 6px; }
  .aw-bar { height: 4px; background: var(--bg4); border-radius: 2px; overflow: hidden; max-width: 420px; }
  .aw-bar-fill { height: 100%; border-radius: 2px; transition: width 0.9s cubic-bezier(0.16,1,0.3,1); }
  .aw-bar-modeled { opacity: 0.55; }
  .aw-row-right { text-align: right; flex-shrink: 0; }
  .aw-prob { font-family: var(--mono); font-size: 19px; font-weight: 500; line-height: 1; }
  .aw-prob-pct { font-size: 11px; color: var(--text3); }
  .aw-prob-modeled { font-size: 15px; }
  .aw-vol { font-family: var(--mono); font-size: 8px; color: var(--text3); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.06em; }
  .aw-nomarket { padding: 20px; background: var(--bg2); border: 1px solid var(--border); border-radius: 4px;
    font-size: 12px; color: var(--text2); line-height: 1.6; }
  /* Per-film races, expandable to the full field */
  .aw-race { background: var(--bg2); border-bottom: 1px solid var(--border); }
  .aw-race:first-child { border-radius: 3px 3px 0 0; }
  .aw-race:last-child { border-bottom: none; border-radius: 0 0 3px 3px; }
  .aw-race-summary { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px;
    padding: 11px 14px; cursor: pointer; list-style: none; }
  .aw-race-summary::-webkit-details-marker { display: none; }
  .aw-race-summary:hover { background: var(--bg3); }
  .aw-race-field { padding: 4px 14px 12px; border-top: 1px solid var(--border); }
  .aw-race-row { display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: center; padding: 5px 0; }
  .aw-race-name { font-size: 11px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .aw-race-prob { font-family: var(--mono); font-size: 11px; color: var(--text3); }
  .aw-race-row.self .aw-race-name { color: var(--gold2); font-weight: 500; }
  .aw-race-row.self .aw-race-prob { color: var(--gold2); }

  /* AWARDS OUTLOOK — modeled factor breakdown */
  .aw-outlook { background: var(--bg2); border: 1px solid var(--border); border-radius: 4px; padding: 16px 18px; }
  .aw-outlook-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
  .aw-outlook-kicker { font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text3); margin-bottom: 5px; }
  .aw-outlook-band { font-family: var(--display); font-size: 20px; letter-spacing: 0.04em; line-height: 1; }
  .aw-outlook-score { font-family: var(--mono); font-size: 26px; font-weight: 500; line-height: 1; white-space: nowrap; }
  .aw-outlook-denom { font-size: 13px; color: var(--text3); }
  .aw-factors { display: flex; flex-direction: column; gap: 12px; }
  .aw-factor-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 4px; }
  .aw-factor-label { font-size: 11px; color: var(--text); font-weight: 500; }
  .aw-factor-score { font-family: var(--mono); font-size: 10px; font-weight: 500; white-space: nowrap; }
  .aw-factor-track { height: 4px; background: var(--bg4); border-radius: 2px; overflow: hidden; }
  .aw-factor-fill { height: 100%; border-radius: 2px; transition: width 0.9s cubic-bezier(0.16,1,0.3,1); }
  .aw-factor-detail { font-size: 10px; color: var(--text3); line-height: 1.55; margin-top: 5px; }
  .aw-outlook-note { font-family: var(--mono); font-size: 9px; line-height: 1.7; color: var(--text3); margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }

  /* P&L SANKEY */
  .pnl-wrap { width: 100%; overflow-x: auto; }
  .pnl-svg { display: block; width: 100%; min-width: 640px; height: auto; }
  .pnl-node-label { font-family: var(--display); font-size: 13px; letter-spacing: 0.04em; fill: var(--text); }
  .pnl-node-value { font-family: var(--mono); font-size: 11px; font-weight: 500; fill: var(--text2); }
  .pnl-node-sub   { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; fill: var(--text3); }
  /* fill-opacity, not opacity, so the background-coloured separator stroke on
     each ribbon stays crisp instead of fading with the fill. */
  .pnl-link { transition: fill-opacity 0.15s; }
  .pnl-link:hover { fill-opacity: 0.5 !important; }
  /* The scroll container is keyboard-focusable, and Chrome's default ring lands
     right behind the first node's label. Keep it for keyboard users only. */
  .pnl-wrap:focus { outline: none; }
  .pnl-wrap:focus-visible { outline: 1px solid var(--gold-dim); outline-offset: 2px; }
  .pnl-node { cursor: pointer; }
  .pnl-node .pnl-node-label { transition: fill 0.15s; }
  .pnl-node:hover .pnl-node-label { fill: var(--gold2); }
  .pnl-node:focus { outline: none; }
  .pnl-node:focus-visible .pnl-hit { stroke: var(--gold); stroke-width: 1; stroke-dasharray: 2 2; }
  /* Modeled values are drawn dashed and labelled in the dim tone so they never
     read as reported figures. */
  .pnl-node-modeled { stroke-dasharray: 3 2; stroke-width: 1; }
  .pnl-legend { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 26px; padding: 14px 0 12px; border-top: 1px solid var(--border); }
  .pnl-legend-item { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 9px; color: var(--text3); letter-spacing: 0.06em; }
  .pnl-legend-swatch { width: 10px; height: 10px; border-radius: 2px; flex: none; }
  .pnl-caption { font-family: var(--mono); font-size: 9px; line-height: 1.7; color: var(--text3); margin-top: 14px; }
  .pnl-caption strong { color: var(--text2); font-weight: 500; }
  .pnl-terr { margin-top: 16px; border: 1px solid var(--border); border-radius: 3px; background: var(--bg2); }
  .pnl-terr > summary { cursor: pointer; padding: 10px 14px; font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text3); list-style: none; display: flex; align-items: center; gap: 8px; }
  .pnl-terr > summary::-webkit-details-marker { display: none; }
  .pnl-terr > summary::before { content: '+'; color: var(--gold); font-size: 12px; line-height: 1; }
  .pnl-terr[open] > summary::before { content: '−'; }
  .pnl-terr > summary:hover { color: var(--text2); }
  .pnl-terr-body { padding: 4px 14px 14px; }
  .pnl-terr-row { display: grid; grid-template-columns: 108px 1fr 84px; align-items: center; gap: 10px; padding: 5px 0; }
  .pnl-terr-name { font-family: var(--mono); font-size: 10px; color: var(--text2); }
  .pnl-terr-track { height: 5px; background: var(--bg4); border-radius: 3px; overflow: hidden; }
  .pnl-terr-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--gold-dim), var(--gold)); }
  .pnl-terr-val { font-family: var(--mono); font-size: 10px; color: var(--text3); text-align: right; }
  .pnl-empty { padding: 28px 0; text-align: center; font-family: var(--mono); font-size: 11px; color: var(--text3); }

  /* P&L EXPLAIN — hover tooltip + click overlay */
  .pnl-tip { position: fixed; z-index: 9999; max-width: 320px; display: none;
    background: rgba(13,16,23,0.97); border: 1px solid var(--border2); border-radius: 4px;
    padding: 10px 12px; box-shadow: 0 8px 28px rgba(0,0,0,0.55); pointer-events: none; font-family: var(--sans); }
  .pnl-tip-title { font-family: var(--display); font-size: 13px; letter-spacing: 0.05em; color: var(--gold2); margin-bottom: 4px; }
  .pnl-tip-body { font-size: 12px; line-height: 1.55; color: var(--text2); }
  .pnl-tip-hint { font-family: var(--mono); font-size: 8px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text3); margin-top: 8px; }
  .pnl-overlay { position: fixed; inset: 0; z-index: 10000; display: none; align-items: center; justify-content: center;
    padding: 24px; background: rgba(4,6,10,0.72); }
  .pnl-modal { position: relative; width: min(560px, 100%); max-height: 86vh; overflow-y: auto;
    background: var(--bg2); border: 1px solid var(--border2); border-radius: 5px;
    padding: 26px 28px 24px; box-shadow: 0 24px 70px rgba(0,0,0,0.6); }
  .pnl-modal-x { position: absolute; top: 8px; right: 10px; background: none; border: none; color: var(--text3);
    font-size: 20px; line-height: 1; cursor: pointer; padding: 4px 7px; font-family: var(--sans); border-radius: 3px; }
  .pnl-modal-x:hover { color: var(--text); background: var(--bg4); }
  /* Focus moves here on open for keyboard users; the UA default ring is bright
     blue and reads as a bug against the noir palette. */
  .pnl-modal-x:focus { outline: none; }
  .pnl-modal-x:focus-visible { outline: 1px solid var(--gold); outline-offset: 1px; color: var(--text); }
  .pnl-modal-kicker { font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text3); margin-bottom: 8px; }
  .pnl-modal-title { font-family: var(--display); font-size: 24px; letter-spacing: 0.04em; color: var(--text); line-height: 1; }
  .pnl-modal-figure { font-family: var(--mono); font-size: 20px; font-weight: 500; margin-top: 8px; }
  .pnl-modal-body { font-size: 13px; line-height: 1.75; color: var(--text2); margin-top: 16px; border-left: 2px solid var(--gold-dim); padding-left: 14px; }
  .pnl-modal-inputs { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 7px; }
  .pnl-modal-input { display: flex; justify-content: space-between; gap: 16px; font-family: var(--mono); font-size: 10px; }
  .pnl-modal-input span:first-child { color: var(--text3); text-transform: uppercase; letter-spacing: 0.07em; white-space: nowrap; }
  .pnl-modal-input span:last-child { color: var(--text2); text-align: right; }

  /* STATUS BAR */
  .status-bar { position: fixed; bottom: 0; left: 0; right: 0; height: 24px; background: var(--bg2); border-top: 1px solid var(--border); display: flex; align-items: center; padding: 0 16px; gap: 20px; z-index: 100; }
  .status-item { font-family: var(--mono); font-size: 10px; color: var(--text3); display: flex; align-items: center; gap: 5px; }
  .status-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
  .status-tmdb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .tmdb-logo { height: 9px; width: auto; display: block; }

  /* VOTE STARS */
  .vote-stars { display: flex; gap: 2px; margin-top: 2px; }
  .star { width: 8px; height: 8px; background: var(--gold); clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
  .star.empty { background: var(--bg4); }

  /* SIMILAR FILMS */
  .similar-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
  .similar-row::-webkit-scrollbar { height: 3px; }
  .similar-row::-webkit-scrollbar-thumb { background: var(--border2); }
  .similar-film { flex-shrink: 0; width: 72px; cursor: pointer; transition: opacity 0.15s; }
  .similar-film:hover { opacity: 0.75; }
  .similar-film img { width: 72px; height: 108px; object-fit: cover; border-radius: 3px; border: 1px solid var(--border); display: block; }
  .similar-film-title { font-size: 9px; color: var(--text3); font-family: var(--mono); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* RATINGS ROW */
  .ratings-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
  .rating-badge { display: flex; align-items: center; gap: 8px; background: var(--bg2); border: 1px solid var(--border); border-radius: 4px; padding: 10px 14px; flex: 1; min-width: 130px; }
  .rating-logo { font-size: 10px; font-family: var(--mono); font-weight: 500; color: var(--text3); text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; }
  .rating-score { font-family: var(--mono); font-size: 22px; font-weight: 500; color: var(--text); line-height: 1; }
  .rating-score.fresh  { color: #fa320a; }
  .rating-score.certified { color: #fb4d0a; }
  .rating-score.imdb  { color: #f5c518; }
  .rating-score.mc-good { color: var(--green); }
  .rating-score.mc-mid  { color: var(--gold); }
  .rating-score.mc-bad  { color: var(--red); }
  .rating-sub { font-size: 9px; color: var(--text3); font-family: var(--mono); margin-top: 2px; }
  .rating-divider { width: 1px; background: var(--border); align-self: stretch; margin: 0 4px; }

  /* SEARCH PANEL */
  .search-panel { position: fixed; top: 84px; right: 0; width: 380px; height: calc(100vh - 108px); background: var(--bg2); border-left: 1px solid var(--border); z-index: 200; display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.2s cubic-bezier(0.16,1,0.3,1); }
  .search-panel.open { transform: translateX(0); }
  .search-panel-header { padding: 14px 16px 10px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
  .search-panel-title { font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text3); font-family: var(--mono); }
  .search-panel-close { background: none; border: none; color: var(--text3); cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 4px; }
  .search-panel-close:hover { color: var(--text); }
  .search-panel-body { flex: 1; overflow-y: auto; }
  .search-panel-body::-webkit-scrollbar { width: 3px; }
  .search-panel-body::-webkit-scrollbar-thumb { background: var(--border2); }
  .search-result { display: flex; gap: 12px; padding: 10px 16px; cursor: pointer; border-bottom: 1px solid var(--border); transition: background 0.15s; align-items: flex-start; }
  .search-result:hover { background: var(--bg3); }
  .search-result-poster { width: 36px; height: 54px; border-radius: 2px; background: var(--bg4); flex-shrink: 0; overflow: hidden; border: 1px solid var(--border); }
  .search-result-poster img { width: 100%; height: 100%; object-fit: cover; }
  .search-result-info { flex: 1; min-width: 0; padding-top: 2px; }
  .search-result-title { font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .search-result-meta { font-size: 10px; color: var(--text3); font-family: var(--mono); margin-top: 3px; }
  .search-result-score { font-size: 11px; font-family: var(--mono); color: var(--text2); margin-top: 4px; }
  .search-empty { display: flex; align-items: center; justify-content: center; height: 120px; font-family: var(--mono); font-size: 11px; color: var(--text3); }
  .search-loading { display: flex; align-items: center; justify-content: center; height: 80px; gap: 8px; }

  /* EMPTY STATE */
  .empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 200px; gap: 8px; color: var(--text3); font-family: var(--mono); font-size: 11px; }

  /* ── CALENDAR VIEW ─────────────────────────────────────────── */
  .cal-view { display: none; flex-direction: column; height: calc(100vh - 108px); background: var(--bg); overflow: hidden; }
  .cal-view.active { display: flex; }

  .cal-toolbar { display: flex; align-items: center; gap: 12px; padding: 14px 24px; border-bottom: 1px solid var(--border); background: var(--bg2); flex-shrink: 0; flex-wrap: wrap; }
  .cal-toolbar-left { display: flex; align-items: center; gap: 10px; flex: 1; flex-wrap: wrap; }
  .cal-toolbar-right { display: flex; align-items: center; gap: 8px; }

  .cal-nav-btn { background: var(--bg3); border: 1px solid var(--border); border-radius: 3px; color: var(--text2); font-family: var(--mono); font-size: 11px; padding: 5px 10px; cursor: pointer; transition: all 0.15s; }
  .cal-nav-btn:hover { background: var(--bg4); color: var(--text); }
  .cal-month-label { font-family: var(--display); font-size: 20px; letter-spacing: 0.05em; color: var(--text); min-width: 180px; }

  .cal-filter { background: var(--bg3); border: 1px solid var(--border); border-radius: 3px; color: var(--text2); font-family: var(--mono); font-size: 10px; padding: 5px 10px; cursor: pointer; transition: all 0.15s; white-space: nowrap; }
  .cal-filter:hover { background: var(--bg4); color: var(--text); }
  .cal-filter.active { background: var(--gold-dim); border-color: rgba(201,168,76,0.3); color: var(--gold2); }

  .cal-view-toggle { display: flex; border: 1px solid var(--border); border-radius: 3px; overflow: hidden; }
  .cal-view-btn { background: var(--bg3); border: none; color: var(--text3); font-family: var(--mono); font-size: 10px; padding: 5px 10px; cursor: pointer; transition: all 0.15s; letter-spacing: 0.04em; text-transform: uppercase; }
  .cal-view-btn + .cal-view-btn { border-left: 1px solid var(--border); }
  .cal-view-btn.active { background: var(--bg4); color: var(--gold); }

  .cal-body { flex: 1; overflow-y: auto; padding: 20px 24px 40px; }
  .cal-body::-webkit-scrollbar { width: 3px; }
  .cal-body::-webkit-scrollbar-thumb { background: var(--border2); }

  /* Month grid view */
  .cal-month-block { margin-bottom: 40px; }
  .cal-month-heading { font-family: var(--display); font-size: 15px; letter-spacing: 0.1em; color: var(--text3); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); display: flex; align-items: baseline; gap: 12px; }
  .cal-month-heading span { font-family: var(--mono); font-size: 10px; color: var(--text3); font-weight: 400; letter-spacing: 0.06em; }

  .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
  .cal-day-header { background: var(--bg2); padding: 6px 8px; font-family: var(--mono); font-size: 9px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.1em; text-align: center; }
  .cal-day { background: var(--bg); min-height: 90px; padding: 6px; position: relative; vertical-align: top; transition: background 0.15s; }
  .cal-day:hover { background: var(--bg2); }
  .cal-day.other-month { background: var(--bg2); opacity: 0.4; }
  .cal-day.today { background: rgba(201,168,76,0.04); }
  .cal-day.today::after { content: ''; position: absolute; top: 4px; right: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
  .cal-day-num { font-family: var(--mono); font-size: 10px; color: var(--text3); margin-bottom: 4px; }
  .cal-day.today .cal-day-num { color: var(--gold2); }

  .cal-film-pill { display: flex; align-items: center; gap: 4px; padding: 3px 5px; border-radius: 2px; margin-bottom: 2px; cursor: pointer; border: 1px solid transparent; transition: all 0.15s; overflow: hidden; }
  .cal-film-pill:hover { border-color: var(--border2); }
  .cal-film-pill-poster { width: 14px; height: 20px; border-radius: 1px; background: var(--bg4); flex-shrink: 0; overflow: hidden; }
  .cal-film-pill-poster img { width: 100%; height: 100%; object-fit: cover; }
  .cal-film-pill-title { font-size: 10px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
  .cal-film-pill-hype { font-family: var(--mono); font-size: 9px; flex-shrink: 0; }
  .cal-film-pill.hype-high { background: rgba(201,168,76,0.08); }
  .cal-film-pill.hype-med  { background: rgba(74,144,217,0.06); }
  .cal-film-pill.hype-low  { background: var(--bg3); }

  .cal-more { font-family: var(--mono); font-size: 9px; color: var(--text3); padding: 2px 4px; cursor: pointer; }
  .cal-more:hover { color: var(--text2); }
  .cal-day.expanded { background: var(--bg3); }
  .cal-day.expanded .cal-more { color: var(--gold); }

  /* List view */
  .cal-list { display: flex; flex-direction: column; gap: 1px; }
  .cal-list-row { display: grid; grid-template-columns: 52px 42px 1fr auto auto auto; align-items: center; gap: 12px; padding: 10px 14px; background: var(--bg2); border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.15s; }
  .cal-list-row:first-child { border-radius: 3px 3px 0 0; }
  .cal-list-row:last-child { border-bottom: none; border-radius: 0 0 3px 3px; }
  .cal-list-row:hover { background: var(--bg3); }
  .cal-list-date { font-family: var(--mono); font-size: 10px; color: var(--text3); }
  .cal-list-poster { width: 28px; height: 40px; border-radius: 2px; background: var(--bg4); overflow: hidden; flex-shrink: 0; }
  .cal-list-poster img { width: 100%; height: 100%; object-fit: cover; }
  .cal-list-title { font-size: 12px; font-weight: 500; color: var(--text); }
  .cal-list-studio { font-size: 10px; color: var(--text3); font-family: var(--mono); margin-top: 2px; }
  .cal-list-hype { font-family: var(--mono); font-size: 13px; font-weight: 500; width: 32px; text-align: right; }
  .cal-list-format { font-family: var(--mono); font-size: 9px; padding: 2px 6px; border-radius: 2px; background: rgba(74,144,217,0.1); color: var(--blue); border: 1px solid rgba(74,144,217,0.15); white-space: nowrap; }
  /* Inferred formats are dimmed and marked so they never read as confirmed. */
  .cal-list-format.inferred { background: transparent; color: var(--text3); border-color: var(--border); border-style: dashed; }
  .cal-fmt-mark { margin-left: 3px; opacity: 0.7; }
  .cal-list-genres { display: flex; gap: 4px; }
  .cal-list-genre-tag { font-family: var(--mono); font-size: 9px; padding: 2px 5px; border-radius: 2px; background: var(--bg4); color: var(--text3); border: 1px solid var(--border); }

  .cal-week-sep { grid-column: 1 / -1; padding: 8px 14px 4px; font-family: var(--mono); font-size: 9px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.1em; background: var(--bg); border-top: 1px solid var(--border); }

  .cal-empty-month { padding: 20px; text-align: center; font-family: var(--mono); font-size: 10px; color: var(--text3); background: var(--bg2); border-radius: 3px; }

  .cal-stats-bar { display: flex; gap: 20px; padding: 0 0 16px; }
  .cal-stat { font-family: var(--mono); font-size: 10px; color: var(--text3); }
  .cal-stat strong { color: var(--text2); font-weight: 500; }

/* ============================================================
   RESPONSIVE
   ============================================================
   index.html was desktop-only — there were no media queries at all, and the
   mobile experience lived in a separate parallel page that drifted out of sync
   and was deleted. This makes the one file work at every width instead.        */

.nav-burger { display: none; background: none; border: none; color: var(--text2);
  font-size: 17px; line-height: 1; padding: 4px 8px; cursor: pointer; border-radius: 3px; }
.nav-burger:hover { color: var(--gold2); background: var(--bg3); }
.sidebar-scrim { display: none; position: fixed; inset: 0; background: rgba(4,6,10,0.6); z-index: 60; }
.sidebar-scrim.open { display: block; }

@media (max-width: 1024px) {
  .data-grid { grid-template-columns: 1fr; }
  .cmp-metric { grid-template-columns: 1fr 130px 1fr; }
  .aw-movers { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
}

@media (max-width: 820px) {
  /* The film list becomes an off-canvas drawer rather than a squeezed column. */
  .layout { grid-template-columns: 1fr; }
  .nav-burger { display: block; }
  .sidebar-left { position: fixed; top: 0; left: 0; bottom: 0; width: 270px; z-index: 70;
    transform: translateX(-100%); transition: transform 0.2s ease; box-shadow: 0 0 40px rgba(0,0,0,0.6); }
  .sidebar-left.open { transform: translateX(0); }

  nav { padding-left: 10px; padding-right: 10px; gap: 10px; }
  /* Flex children default to min-width:auto and refuse to shrink below their
     content, which pushed the search box past the viewport. */
  nav > div { min-width: 0; }
  .nav-links { gap: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; min-width: 0; flex-shrink: 1; }
  .nav-search { flex-shrink: 0; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-search { width: 130px; }

  /* Six tabs no longer fit; scroll them rather than wrap into a second row. */
  .tab-bar { padding: 0 14px; overflow-x: auto; }
  .tab-bar::-webkit-scrollbar { display: none; }

  .film-hero { padding: 20px 16px 16px; }
  .film-poster-large { width: 78px; height: 115px; }
  .hype-ticks { padding: 0 46px; }
  .crew-grid { grid-template-columns: repeat(2, 1fr); }
  .bo-stat-grid { grid-template-columns: 1fr 1fr; }
  .calib-summary { grid-template-columns: 1fr 1fr; }
  .data-panel { padding: 16px; }

  .aw-body, .cal-body { padding: 16px 14px 40px; }
  .aw-head { flex-direction: column; gap: 10px; }
  .aw-head-right { text-align: left; }
  .aw-head-title { font-size: 23px; }

  /* A seven-column month cannot shrink usefully. Mobile defaults to the list
     view (see initCalendar); if the grid is chosen anyway it scrolls. */
  .cal-month-block { overflow-x: auto; }
  .cal-grid { min-width: 660px; }
  .cal-list-row { grid-template-columns: 46px 34px 1fr auto; gap: 8px; padding: 9px 10px; }
  .cal-list-genres, .cal-list-format { display: none; }

  .cmp-pickers, .cmp-heads { grid-template-columns: 1fr; }
  .cmp-vs { display: none; }
  .cmp-metric { grid-template-columns: 1fr 1fr; gap: 6px 10px; padding: 10px 0; }
  .cmp-label { grid-column: 1 / -1; order: -1; text-align: left; }
  .cmp-poster { width: 56px; height: 82px; }
}

@media (max-width: 560px) {
  .nav-logo { font-size: 15px; }
  .nav-search { width: 96px; }
  .aw-row { grid-template-columns: 22px 28px 1fr auto; gap: 8px; padding: 9px 10px; }
  .hype-meter-wrap { gap: 8px; }
  .hype-label-left { width: 54px; font-size: 9px; }
  .hype-ticks { padding: 0 30px; }
  .tag { font-size: 9px; padding: 3px 7px; }
  .aw-poster { width: 28px; height: 40px; }
  .aw-prob { font-size: 16px; }
  .bo-stat-grid, .calib-summary { grid-template-columns: 1fr; }
  .movers-row { grid-template-columns: 1fr 34px 30px 20px; }
  .film-title { font-size: 30px; }
  .pnl-svg { min-width: 560px; }
}

/* Touch devices get no hover, so hover-only affordances must not be the only cue. */
@media (hover: none) {
  .pnl-node .pnl-node-label { fill: var(--text); }
  .aw-row:hover, .movers-row:hover { background: inherit; }
}

/* MODEL BACKTEST */
.bt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.bt-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 4px; padding: 16px 18px; }
.bt-card-strong { border-color: rgba(201,168,76,0.3); background: rgba(201,168,76,0.04); }
.bt-val { font-family: var(--mono); font-size: 34px; font-weight: 500; color: var(--gold2); line-height: 1; }
.bt-card:not(.bt-card-strong) .bt-val { color: var(--text2); }
.bt-lab { font-size: 12px; color: var(--text); margin-top: 8px; line-height: 1.45; }
.bt-sub { font-family: var(--mono); font-size: 9px; color: var(--text3); margin-top: 6px; line-height: 1.5; }
.bt-note { font-family: var(--mono); font-size: 9px; line-height: 1.8; color: var(--text3); max-width: 780px; }
.bt-note strong { color: var(--text2); font-weight: 500; }
@media (max-width: 820px) { .bt-grid { grid-template-columns: 1fr; } .bt-val { font-size: 28px; } }

/* SEASON SIMULATOR */
.sim-headline { font-size: 13px; color: var(--text2); line-height: 1.6; margin: -2px 0 12px; }
.sim-headline strong { color: var(--gold2); font-weight: 500; }
.sim-dim { font-family: var(--mono); font-size: 10px; color: var(--text3); margin-left: 4px; }
