/* D521, the hard review of 12 November 2026: the pro area's fixes, loaded after heritage.css and simple.css.
   Every rule here answers one finding of the review of the Professional layout (Live, Films,
   Review, Studio) and the Sets view; nothing here moves a gate or a decision. */

/* 2 and the re-theme of 12 November 2026: the Professional layout takes the Simple layout's
   tokens (simple.css), so the wordmark, the rail width and the flat primary are the Simple
   ones; here only what polish_chat.css gives the Simple layout's page, header, rail and tab
   bar, so both light themes are one palette and never the Heritage parchment */
html[data-layout="pro"][data-theme], html[data-layout="pro"][data-theme] body { background: var(--bg); }
html[data-layout="pro"][data-theme="light"] header.top { background: color-mix(in srgb, var(--bg) 92%, transparent); }
html[data-layout="pro"][data-theme="light"] nav.rail { background: var(--bg-2); }
@media (max-width: 899px) {
  html[data-layout="pro"][data-theme="light"] nav.tabs { background: color-mix(in srgb, var(--bg-2) 97%, transparent); box-shadow: 0 -2px 10px rgba(0, 0, 0, .05); }
  html[data-layout="pro"][data-theme="dark"] nav.tabs, html[data-layout="pro"]:not([data-theme="light"]) nav.tabs { background: color-mix(in srgb, var(--bg-2) 96%, transparent); }
}
html[data-layout="pro"]:not([data-theme="light"]) { --line: rgba(255, 255, 255, .11); }

/* 4: the machine's own words in the header are a rehearsal chip or nothing; the person
   signed in is an initial */
header.top .env:empty { display: none; }
header.top .env.chipwarn { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: var(--warn); background: var(--warn-soft, rgba(245, 180, 84, .12)); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); }
header.top #me.meav { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--raised); color: var(--ink); font-weight: 700; font-size: 14px; border: 1px solid var(--line-strong); }
.rail .foot { line-height: 1.45; }
.rail .foot .kbd { display: grid; gap: 6px; margin-top: 8px; }
.rail .foot .kbd > span { white-space: nowrap; }

/* 5 and the chat review: no poster is the film's initial, and the film's name reads as text, not disabled */
.filmpick .fp-ph { display: grid; place-items: center; font-weight: 700; font-size: 14px; color: var(--muted);
  border: 1px solid var(--line-strong); }
.filmpick .fp-ph.init { color: var(--accent); }
.filmpick b { color: var(--ink); }

/* 6: the phone header gives the film's name room: the status pill is its dot, every
   control is a full tap target */
@media (max-width: 899px) {
  header.top { gap: 8px; }
  html[data-layout="pro"] header.top #livePill { padding: 0; width: 30px; min-width: 30px; height: 30px; justify-content: center; }
  html[data-layout="pro"] header.top #livePill #liveWords { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  header.top .themebtn, header.top .askbtn { width: 44px; height: 44px; min-height: 44px; min-width: 44px; }
  header.top .filmpick { padding-left: 0; min-width: 0; flex: 1 1 auto; }
  header.top .filmpick b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  /* 39: one 16 px gutter for the header and the page */
  header.top { padding-left: 16px; padding-right: 16px; }
}

/* 7: the badge on a tab clears its icon */
@media (max-width: 899px) {
  nav.tabs .navbtn .badge { top: 2px; right: auto; left: calc(50% + 6px); }
}
@media (min-width: 400px) and (max-width: 899px) {
  html[data-layout="pro"] nav.tabs .navbtn { padding-left: 0; padding-right: 0; }
}

/* 45: Sets, Video and Pictures are the studio's library, not one film's: no film in the header */
body[data-view="sets"] #filmPick, body[data-view="sets"] #livePill,
body[data-view="video"] #filmPick, body[data-view="video"] #livePill,
body[data-view="pictures"] #filmPick, body[data-view="pictures"] #livePill { display: none !important; }

/* 9, 10, 11, 46: Sets: the empty state is the whole width with its own action, the
   top row is centred, the desk alert is a quiet card */
.sets-grid > .empty { grid-column: 1 / -1; max-width: 640px; }
.empty.sets-empty, .sets-empty { display: grid; justify-items: center; gap: 10px; padding: 40px 24px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); color: var(--muted); }
.sets-empty b { color: var(--ink); font-size: 17px; }
.sets-empty span { max-width: 46ch; line-height: 1.5; }
.sets-empty button { margin-top: 6px; }
.sets-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sets-top .note { margin: 0; line-height: 1.2; }
.v-sets .alert.info, #sets .alert.info { border-color: var(--line); border-radius: var(--r); }
.v-sets .alert.info b, #sets .alert.info b { font-size: 16px; }
@media (max-width: 899px) { .sets-top button, .sets-empty button { width: 100%; } }

/* 13, 20: on Live the decision that waits comes first, and the first heading starts at the top */
body[data-view="production"] .v-production { display: flex; flex-direction: column; }
.v-production > #awaiting { order: -1; }
.v-production > #awaiting:empty { display: none; }
#live > .sect:first-child, .view > .sect:first-child { margin-top: 0; }

/* 12: an empty operations column steps aside and the QC column takes the width */
.livelog .cols.one { grid-template-columns: 1fr; }

/* 14: a film with no picture yet shows its initial, never a black box */
.hero .poster.empty { background: linear-gradient(135deg, var(--raised), var(--field)); display: grid; place-items: center;
  align-content: center; gap: 8px; cursor: default; min-height: 300px; }
.hero .poster.empty::after { display: none; }
.hero .poster.empty .init { font: 700 96px/1 var(--display); color: var(--ink); opacity: .3; }
.hero .poster.empty .note { color: var(--muted); }
.hero .ringsnone { margin: 4px 0; }

/* 16, 18: the QC verdict and its score stay on one line, with space before them */
.livelog .vd, .card.live .vd { white-space: nowrap; margin-left: 2px; }
@media (max-width: 899px) {
  .card.live .row .k, .livelog .row .k { flex: 0 0 44px; }
}
:root[data-theme="light"] .livelog .bad, :root[data-theme="light"] .card.live .bad { color: #a32a1c; }

/* 17, 42: a section's meta lines up with its title, and goes under it on a phone */
.sect { align-items: baseline; }
.sect::after { align-self: center; }
@media (max-width: 899px) {
  .sect { flex-wrap: wrap; row-gap: 2px; }
  .sect > span { flex-basis: 100%; order: 3; }
  .sect::after { display: none; }
}

/* 19: on a desk the header does not repeat the page title it sits above */
@media (min-width: 900px) {
  html[data-layout="pro"] body[data-view="films"] header.top #viewName,
  html[data-layout="pro"] body[data-view="review"] header.top #viewName,
  html[data-layout="pro"] body[data-view="studio"] header.top #viewName { display: none; }
}

/* 21, 22: the set-up card: "Not now" sits on the eyebrow's line, the ticks read as steps to
   do, every button a tap target */
.card.setup .setup-head { align-items: center; }
.card.setup .setup-head h2 { margin: 0; }
.setup-steps li:not(.done) .tick { border-style: dashed; opacity: .55; }
.setup-steps button, .card.setup .setup-head button { min-height: 40px; }
@media (pointer: coarse) { .setup-steps button, .card.setup .setup-head button { min-height: 44px; } }

/* 23: the morning brief is a card like its neighbours */
.brief { border-color: var(--line); border-radius: var(--r-l); background: var(--panel); padding: 14px 18px; }
.brief b { display: block; margin-bottom: 2px; }

/* 25: the waiting row: the film's initial where there is no poster, Later at the right */
.ib-ps.blank { display: grid; place-items: center; }
.ib-ps .init { font: 700 32px/1 var(--display); color: var(--ink); opacity: .35; }
.ib-hd { align-items: center; }
.ib-hd .ib-later-btn { margin: 0 0 0 auto; }
img.ib-th { object-fit: cover; background: var(--raised); }

/* 27: the selected tray is plain, and a zero is no grey chip */
.v-review .segs button[aria-selected="true"] { background: var(--ink); color: var(--bg); box-shadow: none; }
.v-review .segs button[aria-selected="true"] .n { background: color-mix(in srgb, var(--bg) 22%, transparent); color: var(--bg); }
.segs button .n.zero { display: none; }

/* 28: the header's Ask already asks; the Review page does not repeat it */
html[data-layout="pro"] #tray-decisions > form.ask { display: none; }

/* 29: a card's eyebrow stays on one line and its chip sits on the line */
#cards .card > h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.pending > h2::before { vertical-align: middle; line-height: 1; padding: 4px 8px; }

/* 1: a frame with no picture says so */
.strip .frame-noimg { display: grid; place-items: center; aspect-ratio: 16 / 9; color: var(--faint); font-size: 12px;
  border: 1px dashed var(--line-strong); border-radius: var(--r-xs); }

/* 30: "Talk about this" is the last thing in the row on a desk, and the row's own line on a phone */
.card > .actions .talkbtn { margin-left: auto; }
@media (max-width: 899px) {
  .card > .actions .talkbtn { margin-left: 0; width: 100%; justify-content: flex-start; padding-left: 0; }
}

/* 32: the Studio jump bar is a row of chips, not a pill inside a pill; 38: on a phone it
   scrolls on the page's own gutter */
.jumpbar { background: transparent; border: 0; box-shadow: none; padding: 0; }
/* INT3 (the walk of 24 November 2026): the row of jumps is sticky, so it sits on an opaque bar the
   width of the view and the cards scroll under it, never through the gaps between the chips */
.jumpbar { background: var(--bg); width: auto; max-width: none; border-radius: 0; padding: 6px 0; }
.jumpbar a { min-height: 36px; border: 1px solid var(--line); }
@media (max-width: 899px) {
  .jumpbar { margin-left: -16px; margin-right: -16px; padding: 0 16px; scroll-padding-inline: 16px; }
}

/* 34: a section inside a card is a card-sized heading, not a page heading */
.card .sect h3 { font-family: var(--font); font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.card .sect::after { display: none; }
.card .sect > span { margin-left: auto; }
.card .sect > button { margin-left: 8px; }

/* 35: the product row's buttons sit on its centre, and the explanation keeps a reading measure */
.row.product { align-items: center; }
.card p.note, .card > p { max-width: 72ch; }

/* 36: a disabled primary reads as disabled in both themes */
button.primary:disabled, button.primary[disabled] { background: var(--raised); color: var(--faint); border-color: var(--line);
  box-shadow: none; opacity: 1; cursor: not-allowed; filter: none; }

/* 37: one height per kind of button: 36 for a quiet one on a desk, 44 under a thumb */
button.mini, .btn.mini { min-height: 36px; }
@media (pointer: coarse) { button.mini, .btn.mini { min-height: 44px; } }

/* 40, 41: light cards stand off the page (white on the Simple light ground) and faint words
   are readable; the tokens are the Simple layout's */

/* the person page: a face or an initial always, and "Reference" on its own line */
.pp-face.none { display: grid; place-items: center; background: var(--raised); color: var(--ink); font: 700 30px/1 var(--display); }
.pp-ref .pp-reflabel { display: block; margin-bottom: 2px; }

/* the one-by-one review without Accept: two buttons and the rule as a caption under them */
.swacts.main.two { grid-template-columns: 1fr 1fr; }
p.swrule { text-align: center; color: var(--muted); font-size: 12.5px; margin: 0 16px 6px; flex: none; }
.swnote.on ~ p.swrule { display: none; }

/* money: the quote muted until there is one */
.money-top b.muted { color: var(--faint); font-weight: 600; }

/* 14: a poster whose file cannot load is the panel colour, never black */
.hero .poster { background-color: var(--raised); }
.rail .foot .note { font-size: inherit; color: var(--warn); }
@media (max-width: 899px) { .card .sect > button { margin-left: 0; } }
