:root {
  font-family: var(--font-family-sans);
  color: var(--color-text);
  background: var(--color-page);
  font-synthesis: none;
}
* { box-sizing: border-box; }
/* BAND-002859, brand 1.0: every drawing of the product's identity has one version per theme (the
   lockups, the small drawing and mark.svg for light surfaces; the inverse lockups and
   mark-inverse.svg, on the lifted tile, for dark ones). A page carries both and shows the one for
   the resolved theme, which js/theme.js (or the session page's script) sets before the first paint. */
:root[data-theme="dark"] .theme-mark-light,
:root:not([data-theme="dark"]) .theme-mark-dark { display: none; }
/* BAND-002353: the page is the shell; the header is full width, the content is centred by .productionstudio-shell (css/app-shell.css). */
body { margin: 0; font-size: var(--font-size-base); line-height: var(--line-height-normal); background: var(--color-page); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
/* BAND-002351 (UI-09): one heading scale, strictly h1 > h2 > h3 > h4, never tracked negatively. */
h1 { font-size: var(--font-size-h1); line-height: var(--line-height-tight); margin: 0; }
.card { min-width: 0; background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-lg); padding: var(--space-5); box-shadow: var(--shadow-sm); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-5); }
h2 { margin: 0; font-size: var(--font-size-h2); font-weight: var(--font-weight-semibold); line-height: var(--line-height-snug); }
h3 { color: var(--color-text); font-size: var(--font-size-h3); font-weight: var(--font-weight-semibold); line-height: var(--line-height-snug); }
h4 { color: var(--color-text); font-size: var(--font-size-h4); font-weight: var(--font-weight-semibold); line-height: var(--line-height-snug); }
/* Brand 1.0: labels are in sentence case, never set in capitals (Velanum.Brand VOICE.md,
   "Capitalisation and punctuation"); the weight and the muted colour carry the label. */
.step-label { color: var(--color-text-muted); font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold); }
.library-card, .upload-card { padding: var(--space-5); }
.upload-card .section-heading { align-items: baseline; }
.list-item { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); padding: var(--space-4) 0; border-bottom: 1px solid var(--color-divider); }
.list-item:first-child { padding-top: 0; }
.list-item:last-child { border-bottom: 0; padding-bottom: 0; }
.project-summary { min-width: 0; }
.project-summary > strong { display: block; font-size: var(--font-size-md); font-weight: var(--font-weight-semibold); overflow-wrap: anywhere; margin-bottom: var(--space-1-5); }
.row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.project-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-1-5); }
.project-actions button, .project-actions a { min-height: 31px; padding: var(--space-1) var(--space-2); font-size: var(--font-size-xs); text-align: center; }
.project-actions a { display: grid; place-items: center; border: 1px solid var(--color-divider-strong); border-radius: var(--radius-md); text-decoration: none; font-weight: var(--font-weight-semibold); }
.project-actions a:hover { background: var(--color-accent-subtle); }
label { display: block; color: var(--color-text-muted); font-size: var(--font-size-sm); font-weight: var(--font-weight-medium); margin: var(--space-4) 0 var(--space-1-5); }
input:not([type]), input[type=text], input[type=number], input[type=search], input[type=file], input[type=datetime-local], select, textarea { display: block; width: 100%; min-width: 0; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-text); padding: var(--space-2-5) var(--space-3); font-size: var(--font-size-md); transition: border-color var(--motion-duration-short) var(--motion-easing-standard), box-shadow var(--motion-duration-short) var(--motion-easing-standard); }
input:not([type]):hover, input[type=text]:hover, input[type=number]:hover, input[type=search]:hover, input[type=datetime-local]:hover, select:hover, textarea:hover { border-color: var(--color-border-strong); }
input::placeholder, textarea::placeholder { color: var(--color-text-muted); opacity: 1; }
input[type=file] { padding: var(--space-2-5); min-height: 70px; background: var(--color-surface-2); border-style: dashed; font-size: var(--font-size-xs); }
input[type=file]::file-selector-button { background: var(--color-accent-subtle); color: var(--color-accent); border: 0; border-radius: var(--radius-sm); margin: 0 var(--space-2) var(--space-1) 0; padding: var(--space-2) var(--space-2-5); cursor: pointer; font: inherit; font-weight: var(--font-weight-semibold); }
input[type=checkbox] { accent-color: var(--color-accent); width: 15px; height: 15px; flex-shrink: 0; margin: 0; }
input[type=radio] { accent-color: var(--color-accent); }
textarea { min-height: 68px; resize: vertical; line-height: var(--line-height-relaxed); }
:focus-visible { outline: var(--focus-ring-width) solid var(--color-focus); outline-offset: var(--focus-ring-offset); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--color-accent); box-shadow: var(--shadow-focus-halo); }
/* BAND-002877: the brand's radius roles (Velanum.Brand TOKENS.md): buttons and fields take md; the
   options of a segmented group (the language pair here and in Settings, the theme switch, the
   Library view switch) keep sm. */
button { display: inline-flex; justify-content: center; align-items: center; min-height: 36px; margin: 0; border: 1px solid transparent; border-radius: var(--radius-md); padding: var(--space-2) var(--space-3); background: var(--color-accent); color: var(--color-text-on-accent); font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); line-height: var(--line-height-snug); cursor: pointer; transition: background var(--motion-duration-short) var(--motion-easing-standard), border-color var(--motion-duration-short) var(--motion-easing-standard); }
button:hover:not(:disabled) { background: var(--color-accent-hover); }
/* BAND-002352 (UI-10): button variants. The default is the primary action; each action group has
   at most one. secondary is outlined, ghost is text only (tertiary actions), danger is destructive
   (outlined; .is-strong fills it for the final confirmation of a destructive dialog). */
button.secondary { background: var(--color-surface); border-color: var(--color-divider-strong); color: var(--color-text); }
button.secondary:hover:not(:disabled) { background: var(--color-surface-3); border-color: var(--color-border); color: var(--color-text); }
button.ghost { background: transparent; border-color: transparent; color: var(--color-accent); }
button.ghost:hover:not(:disabled) { background: var(--color-accent-subtle); color: var(--color-accent-hover); }
button.danger { background: var(--color-surface); border-color: var(--color-danger-border); color: var(--color-danger); }
button.danger:hover:not(:disabled) { background: var(--color-danger-subtle); border-color: var(--color-danger); }
button.danger.is-strong { background: var(--color-danger); border-color: var(--color-danger); color: var(--color-text-on-danger); }
button.danger.is-strong:hover:not(:disabled) { background: var(--color-danger); border-color: var(--color-danger-border); box-shadow: var(--shadow-sm); }
button.compact { min-height: 29px; padding: var(--space-1) var(--space-2); font-size: var(--font-size-xs); }
[data-locale-option] { border-radius: var(--radius-sm); }
/* The language in use (Settings): the brand's selected fill with the accent edge and a heavier
   weight, never the primary fill, which marks the one primary action (brand D-11). */
button[data-locale-option][aria-pressed="false"]:enabled { font-weight: var(--font-weight-regular); }
button[data-locale-option][aria-pressed="true"]:enabled { background: var(--color-selected); border-color: var(--color-accent); color: var(--color-text); }
/* Placed after every variant of equal specificity; variants with higher specificity guard
   their colours with :enabled, so no !important is needed. */
button:disabled { cursor: not-allowed; background: var(--color-surface-3); color: var(--color-text-muted); border-color: var(--color-divider-strong); }
#uploadBtn { width: 100%; margin-top: var(--space-5); min-height: 40px; }
#statusCard { grid-column: 1 / -1; }
#statusCard .meta { display: grid; gap: var(--space-2); font-size: var(--font-size-sm); color: var(--color-text-muted); }
#statusCard .meta > * { min-width: 0; overflow-wrap: anywhere; }
#statusCard .project-fields { margin-bottom: var(--space-1); }
#projectId { font-size: var(--font-size-xs); }
#links { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; font-size: var(--font-size-sm); margin-top: var(--space-3); }
#links a { font-weight: var(--font-weight-semibold); text-underline-offset: 3px; }
#reviewCard > label:first-of-type { margin-top: 0; }
fieldset { margin: var(--space-5) 0; padding: var(--space-3-5); border: 1px solid var(--color-divider); border-radius: var(--radius-md); background: var(--color-surface-2); min-width: 0; }
legend { padding: 0 var(--space-1-5); font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold); color: var(--color-text-muted); }
fieldset label { margin-top: var(--space-2); }
label[for=highlightSpokenWord] { display: flex; align-items: flex-start; gap: var(--space-2); font-size: var(--font-size-xs); margin-top: var(--space-3); }
.review-actions { gap: var(--space-2); }
.review-actions button { font-size: var(--font-size-xs); padding: var(--space-1-5) var(--space-2-5); min-height: 33px; }
.fragment-table-scroll { overflow-x: auto; margin: var(--space-4) calc(-1 * var(--space-1)) 0; }
.fragment-table { width: 100%; min-width: 380px; table-layout: fixed; border-collapse: collapse; font-size: var(--font-size-xs); }
.check-column { width: 30px; }
.time-column { width: 100px; }
.duration-column { width: 44px; }
th, td { text-align: left; padding: var(--space-2-5) var(--space-1-5); border-bottom: 1px solid var(--color-divider); vertical-align: top; }
th { color: var(--color-text-muted); font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold); background: var(--color-surface-2); }
td.mono { font-size: var(--font-size-xs); }
td textarea { font-size: var(--font-size-sm); padding: var(--space-2); min-height: 68px; }
.frag-check { width: 30px; }
/* Brand 1.0 (D-1): codes, ids, hashes, time codes and raw data are set in the brand's mono family,
   JetBrains Mono, with its ligatures off, so 0 and O, 1, l and I stay apart and nothing joins. */
pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--color-surface-2); border: 1px solid var(--color-divider); border-radius: var(--radius-md); padding: var(--space-3-5); overflow: auto; max-height: 190px; font-family: var(--font-family-mono); font-variant-ligatures: none; font-size: var(--font-size-xs); line-height: var(--line-height-relaxed); color: var(--color-text-muted); }
/* Brand 1.0 (D-1, TYPOGRAPHY.md "Monospace"): mono is for codes, IDs and raw data, never prose. The
   source transcript is prose, so it takes the interface font; it keeps the line breaks of pre. */
#transcript { font-family: var(--font-family-sans); font-variant-ligatures: normal; }
.preview-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
.preview-pane { min-width: 0; }
.preview-pane label { margin: 0 0 var(--space-2); font-size: var(--font-size-xs); }
video { display: block; width: 100%; max-height: 420px; aspect-ratio: 16 / 10; object-fit: contain; background: var(--color-media); color: var(--color-text-on-media); border-radius: var(--radius-md); }
.muted { color: var(--color-text-muted); font-size: var(--font-size-sm); }
.mono { font-family: var(--font-family-mono); font-variant-ligatures: none; font-size: var(--font-size-xs); }
/* Numbers, durations and metrics line up in columns and do not jitter while polling. */
table, .mono, .step-label, #statusCard .meta { font-variant-numeric: tabular-nums; }
/* After .muted and .mono so the project row keeps its smaller id line without !important. */
.list-item .project-details { margin-top: var(--space-2); font-size: var(--font-size-xs); overflow-wrap: anywhere; color: var(--color-text-muted); line-height: var(--line-height-normal); }
.err { color: var(--color-danger); white-space: pre-wrap; overflow-wrap: anywhere; margin-top: var(--space-2); font-size: var(--font-size-sm); }
.ok { color: var(--color-success); }
a { color: var(--color-accent); }
a:hover { color: var(--color-accent-hover); }
/* BAND-002352 (UI-10): the one badge. js/ui/badge.js sets data-tone; the project state badge keeps
   its status class (.badge.ready, ...) as the status-to-tone map. */
.badge { display: inline-block; padding: var(--space-0-5) var(--space-2); border: 1px solid transparent; border-radius: var(--radius-pill); background: var(--color-surface-3); color: var(--color-text-muted); font-size: var(--font-size-xs); line-height: var(--line-height-normal); font-weight: var(--font-weight-semibold); vertical-align: middle; white-space: nowrap; }
.badge[data-tone="success"], .badge.ready { background: var(--color-success-subtle); border-color: var(--color-success-border); color: var(--color-success); }
.badge[data-tone="danger"], .badge.failed, .badge.cancelled { background: var(--color-danger-subtle); border-color: var(--color-danger-border); color: var(--color-danger); }
.badge[data-tone="warning"], .badge.analyzing, .badge.rendering, .badge.publishing, .badge.uploaded, .badge.processing { background: var(--color-warning-subtle); border-color: var(--color-warning-border); color: var(--color-warning); }
.badge[data-tone="info"], .badge.reviewready { background: var(--color-info-subtle); border-color: var(--color-info-border); color: var(--color-info); }
.workspace-empty { grid-column: 1 / -1; min-height: 360px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: var(--space-12); background: var(--color-surface-2); border-style: dashed; border-color: var(--color-divider-strong); box-shadow: none; }
.workspace-empty h2 { max-width: 390px; margin-top: var(--space-4); color: var(--color-text-muted); font-weight: var(--font-weight-medium); line-height: var(--line-height-snug); }
.workspace-empty p { max-width: 390px; color: var(--color-text-muted); font-size: var(--font-size-md); line-height: var(--line-height-loose); }
#publishCard, #distributionCard { grid-column: 1 / -1; }
.distribution-channel { margin: var(--space-2-5) 0 var(--space-3-5); }
.distribution-media { display: grid; grid-template-columns: 18px 64px minmax(0, 1fr); align-items: start; gap: var(--space-2); margin: var(--space-2) 0; }
.publication-platforms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.publication-platform { margin: var(--space-2-5) 0 var(--space-3-5); }
.publication-target { display: grid; grid-template-columns: 18px 64px minmax(0, 1fr); align-items: start; gap: var(--space-2); margin: var(--space-2) 0; }
.publication-target.is-unavailable { opacity: 0.78; }
.publication-target.is-unavailable .publication-capability-reason { color: var(--color-danger); }
.publication-capability-reason { color: var(--color-text-muted); font-size: var(--font-size-xs); line-height: var(--line-height-normal); overflow-wrap: anywhere; }
.publication-actions { margin-top: var(--space-3-5); }
/* The handoff status is a .panel; its kind picks the tone. */
.handoff-status.is-non-terminal { border-color: var(--color-info-border); background: var(--color-info-subtle); }
.handoff-status.is-terminal-success { border-color: var(--color-success-border); background: var(--color-success-subtle); }
.handoff-status.is-terminal-failure { border-color: var(--color-danger-border); background: var(--color-danger-subtle); }
.handoff-status.is-unknown-outcome { border-color: var(--color-warning-border); background: var(--color-warning-subtle); }
.hidden { display: none !important; }
[hidden] { display: none !important; }
/* BAND-002353: the source and the export side by side once the stage is wide enough. */
@media (width >= 1024px) {
  .preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (width < 1024px) {
  .card { padding: var(--space-4); }
}
@media (width < 600px) {
  .publication-platforms { grid-template-columns: minmax(0, 1fr); }
  .workspace-empty { min-height: 240px; padding: var(--space-6); }
  .section-heading { gap: var(--space-2); }
}
/* Motion utility: the user preference must beat every component transition. */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

.production-review-state { font-weight: var(--font-weight-bold); margin: var(--space-2-5) 0 var(--space-1-5); }
.production-review-state[data-review-state="approved"] { color: var(--color-success); }
.production-review-state[data-review-state="changes_requested"],
.production-review-state[data-review-state="stale"] { color: var(--color-warning); }
.production-review-slots { display: grid; gap: var(--space-3); margin: var(--space-3) 0; }
.production-review-slot-heading,
.production-review-artifact-head { display: flex; justify-content: space-between; gap: var(--space-3); align-items: baseline; }
.production-review-slot h3 { margin: 0; }
.production-review-slot textarea { width: 100%; margin-top: var(--space-2); min-height: 3.5rem; }
.production-review-artifact { border-top: 1px solid var(--color-divider); margin-top: var(--space-2-5); padding-top: var(--space-2-5); }
.production-review-artifact > a,
.production-review-artifact > button { margin-top: var(--space-1-5); }
.production-review-actions { margin-top: var(--space-2-5); }

/* Former inline styles of index.html and scripts. */
.row-spaced { margin-top: var(--space-2-5); }
.subheading { margin-top: var(--space-4); }
.subheading-flush { margin: 0; }
.cover-candidate-image { max-width: 220px; max-height: 220px; object-fit: contain; background: var(--color-media); color: var(--color-text-on-media); border-radius: var(--radius-sm); }
/* BAND-002350: identifiers, codes, revisions and paths sit in a closed "Technical details"
   disclosure (native <details>, keyboard-operable), quieter than the text around it. */
details.technical { margin-top: var(--space-2); font-size: var(--font-size-sm); color: var(--color-text-muted); }
details.technical > summary { width: fit-content; cursor: pointer; border-radius: var(--radius-sm); color: var(--color-text-muted); font-weight: var(--font-weight-medium); }
details.technical > summary:hover { color: var(--color-text); }
details.technical > summary:focus-visible { outline: var(--focus-ring-width) solid var(--color-focus); outline-offset: var(--focus-ring-offset); }
details.technical[open] > summary { margin-bottom: var(--space-1-5); }
.technical-fields { display: grid; gap: var(--space-1); padding: var(--space-2) var(--space-2-5); border-left: 2px solid var(--color-divider-strong); border-radius: var(--radius-sm); background: var(--color-surface-2); overflow-wrap: anywhere; }
.technical-fields .mono { color: var(--color-text); }
/* The row label weighs the same in the project card rows (span) and the dom.technicalDetails rows (strong). */
.technical-fields > * > :first-child { font-weight: var(--font-weight-medium); }
.production-review-binding:empty { display: none; }
/* BAND-002350: the ended session, said once for the page and kept until it is back. */
.session-banner { position: sticky; top: var(--size-shell-header); z-index: var(--z-sticky); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); max-width: var(--size-content-max); margin: var(--space-4) auto 0; padding: var(--space-3) var(--space-4); border: 1px solid var(--color-warning-border); border-radius: var(--radius-md); background: var(--color-warning-subtle); color: var(--color-text); box-shadow: var(--shadow-sm); }
.session-banner[hidden] { display: none; }
.session-banner-text { min-width: 0; flex: 1 1 320px; }
.session-banner-text p { margin: var(--space-1) 0 0; font-size: var(--font-size-md); }
.session-banner-link { display: inline-block; margin-top: var(--space-2); font-size: var(--font-size-md); font-weight: var(--font-weight-semibold); }
.session-banner-status:empty { display: none; }
