/* Turonet · the project's phase on the dashboard and the financing plan (production.js); the shoot fields of the locations (entities.js); Postproducció (sections/post.js) */
.pill.red {
  background: #fbe9e9;
  color: #a23b3b;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.link-button {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.link-button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ---------- locations ---------- */
.location-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 6px;
}
.location-badges .pill {
  font-size: 12px;
}
.location-summary {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}
.location-summary b {
  color: var(--ink);
}
.toolbar:has(.location-summary) {
  flex-wrap: wrap;
  gap: 10px 18px;
}
.location-section {
  margin: 26px 0 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.location-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px;
}
.location-grid input,
.location-grid select {
  width: 100%;
}
.field-hint {
  margin: -4px 0 14px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}
.location-validated {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 16px 0 8px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f6f9f7;
  cursor: pointer;
}
.location-validated input {
  width: auto;
  margin: 3px 0 0;
  flex: none;
  accent-color: var(--green);
}
.location-validated span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.location-validated small {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}

/* ---------- phase of the project ---------- */
.phase-panel {
  margin: 0 0 26px;
  padding: 22px 24px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.phase-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px 24px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.phase-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.phase-mode {
  padding: 2px 7px;
  border-radius: 999px;
  background: #e7f3eb;
  color: #3c6d41;
  font-size: 10.5px;
  letter-spacing: 0.06em;
}
.phase-mode.is-manual {
  background: #fff3d9;
  color: #976717;
}
.phase-now {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 6px 0 0;
  font:
    800 30px/1.1 "Manrope",
    sans-serif;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--ink);
}
.phase-progress {
  font:
    600 15px/1.3 "DM Sans",
    sans-serif;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}
.phase-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  max-width: 420px;
}
.phase-why {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.phase-why b {
  color: var(--ink);
  font-weight: 650;
}
.phase-hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  text-align: right;
}
.phase-steps {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}
.phase-steps button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 10px 11px 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: #f1f4f2;
  color: var(--muted);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.phase-steps button:hover {
  border-color: #b9c9be;
}
.phase-steps button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
.phase-steps li.selected button {
  border-color: var(--ink);
}
.phase-steps li.done button {
  background: #e7f3eb;
  color: #3c6d41;
}
.phase-steps li.warn button {
  background: #fff6e3;
  color: #8a5d14;
}
.phase-steps li.current button {
  background: var(--lime);
  color: var(--on-accent, #19232b);
}
.phase-step-n {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
}
.phase-mark {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  font-size: 10px;
  line-height: 1;
}
.phase-steps li.done .phase-mark {
  background: #3c6d41;
  color: #fff;
}
.phase-steps li.warn .phase-mark {
  background: #d9822b;
  color: #fff;
}
.phase-step-name {
  font-size: 13px;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.phase-step-state {
  font-size: 11.5px;
  line-height: 1.35;
  opacity: 0.85;
  overflow-wrap: anywhere;
}
.phase-bar {
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 7px;
  height: 4px;
  border-radius: 4px;
  background: rgba(25, 35, 43, 0.1);
  overflow: hidden;
}
.phase-bar i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: #5aa36a;
}
.phase-steps li.warn .phase-bar i {
  background: #d9822b;
}
.phase-steps li.current .phase-bar {
  background: rgba(25, 35, 43, 0.16);
}
.phase-steps li.current .phase-bar i {
  background: var(--on-accent, #19232b);
}
.phase-panel.is-loading .phase-steps {
  opacity: 0.55;
}
.phase-steps li.is-closed button {
  background: #f1f3f2;
  color: #7b858d;
}
.phase-detail.is-closed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  flex-wrap: wrap;
}
.phase-detail.is-closed .phase-detail-head {
  flex: 1 1 100%;
  margin-bottom: 0;
}
.phase-closed {
  flex: 1 1 280px;
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}
.glance-card.is-text:hover {
  border-color: var(--line);
}
.phase-detail {
  margin: 0 0 20px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfcfb;
}
.phase-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.phase-detail h3 {
  margin: 0;
  font-size: 16px;
  color: var(--ink);
}
.phase-detail h3 small {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.phase-detail-head p {
  margin: 3px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.phase-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 22px;
}
.phase-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 0;
  min-width: 0;
}
.phase-check {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  border: 1.5px solid #c3ccd2;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.phase-checklist li.is-ok .phase-check {
  border-color: #3c6d41;
  background: #3c6d41;
  color: #fff;
  font-size: 12px;
}
.phase-checklist li.is-partial .phase-check {
  width: auto;
  min-width: 22px;
  padding: 0 5px;
  border-radius: 11px;
  border-color: #d9822b;
  color: #a85d12;
}
.phase-checklist li.is-optional .phase-check {
  border-style: dashed;
}
.phase-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.phase-item-label {
  font-size: 14px;
  color: var(--ink);
}
.phase-item-label a {
  color: inherit;
  text-decoration-color: rgba(25, 35, 43, 0.3);
  text-underline-offset: 2px;
}
.phase-item-label a:hover {
  text-decoration-color: currentColor;
}
.phase-checklist li.is-ok .phase-item-label {
  color: var(--muted);
}
.phase-item small {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.phase-optional {
  padding: 1px 6px;
  border-radius: 999px;
  background: #edf0f2;
  font-size: 11px;
  color: var(--muted);
}
.glance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.glance-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 16px 16px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfcfb;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s;
}
.glance-card:hover {
  border-color: #b9c9be;
}
.glance-card:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
.glance-label {
  font-size: 13px;
  color: var(--muted);
}
.glance-value {
  font:
    700 24px/1.15 "Manrope",
    sans-serif;
  letter-spacing: -0.5px;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.glance-of {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--muted);
}
.glance-card small {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.glance-card.is-now {
  border-color: var(--lime);
  box-shadow: inset 3px 0 0 var(--lime);
}
.glance-card.is-alert {
  box-shadow: inset 3px 0 0 #d9822b;
}
.glance-card.is-done .glance-value {
  color: var(--green);
}
.glance-alert {
  color: #a85d12;
  font-weight: 600;
}

/* ---------- financing plan ---------- */
.financing-summary,
.financing-glance,
.financing-sources,
.financing-grants {
  margin-bottom: 22px;
}
.financing-figures {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.financing-figure {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfb;
}
.financing-figure span {
  font-size: 13px;
  color: var(--muted);
}
.financing-figure b {
  font:
    700 22px/1.2 "Manrope",
    sans-serif;
  letter-spacing: -0.4px;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.financing-figure small {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.financing-figure.is-confirmed {
  box-shadow: inset 3px 0 0 #3c8a4f;
}
.financing-figure.is-expected {
  box-shadow: inset 3px 0 0 #9fd3ac;
}
.financing-bar {
  display: flex;
  height: 12px;
  border-radius: 6px;
  background: #eceff1;
  overflow: hidden;
}
.financing-bar span {
  display: block;
  height: 100%;
}
.financing-bar .is-confirmed {
  background: #3c8a4f;
}
.financing-bar .is-expected {
  background: repeating-linear-gradient(135deg, #9fd3ac 0 6px, #b8e0c2 6px 12px);
}
.financing-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}
.financing-legend span::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 3px;
  background: #eceff1;
  vertical-align: -1px;
}
.financing-legend .is-confirmed::before {
  background: #3c8a4f;
}
.financing-legend .is-expected::before {
  background: #9fd3ac;
}
.financing-closed {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 18px 0 0;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f6f9f7;
  cursor: pointer;
}
.financing-closed input {
  width: auto;
  margin: 3px 0 0;
  flex: none;
  accent-color: var(--green);
}
.financing-closed span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.financing-closed small {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}
.financing-table td {
  vertical-align: middle;
  white-space: normal;
}
/* the hidden headings (sr-only, absolute) stay inside the table that scrolls: on the phone they made the page wider */
.financing-sources .table-wrap {
  position: relative;
}
.financing-table .row-title small {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--muted);
  white-space: normal;
}
.financing-table tr.is-denied td {
  color: var(--muted);
}
.financing-table .row-title small.financing-share-off {
  color: #8a5a00;
}
.financing-table .row-title .link-button {
  margin-top: 2px;
  font-size: 12.5px;
  font-weight: 600;
}
html.dark .financing-table .row-title small.financing-share-off {
  color: #f0c36a;
}
.financing-table tr.is-denied .financing-amount {
  text-decoration: line-through;
}
.financing-table tfoot td {
  font-weight: 650;
  color: var(--ink);
  background: #f9fafb;
}
.financing-amount {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.financing-why {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--muted);
}
.financing-actions {
  display: inline-flex;
  gap: 6px;
  justify-content: flex-end;
}
.financing-empty p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.55;
}
.financing-grants .document-row {
  flex-wrap: wrap;
}
.financing-glance-line {
  margin: 0 0 12px;
  color: var(--muted);
}
.financing-glance-line b {
  color: var(--ink);
}
.financing-glance .button {
  margin-top: 16px;
}
.financing-form-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px;
}
.financing-form-cols input,
.financing-form-cols select {
  width: 100%;
}
.financing-target-choice {
  display: grid;
  gap: 8px;
  margin: 12px 0 16px;
  padding: 0;
  border: 0;
}
.financing-target-choice label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
}
.financing-target-choice input {
  width: auto;
  margin: 3px 0 0;
  flex: none;
  accent-color: var(--green);
}
.financing-target-choice span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.financing-target-choice small {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}
/* the project's own limit of public aid (its format's or its territory's: editPublicLimitNiu) */
.financing-target-choice .limit-auto {
  font-style: normal;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--green);
}
.financing-limit-why {
  color: var(--muted);
}
.financing-target-choice legend {
  padding: 0;
  margin-bottom: 2px;
}
/* public aid, overfinancing and the instalments (R2 proposta 18) */
.financing-public {
  margin: 16px 0 0;
}
.financing-public p {
  margin: 0 0 7px;
  font-size: 13.5px;
  color: var(--muted);
}
.financing-public p span {
  color: var(--ink);
  font-weight: 600;
}
.financing-public p b {
  font:
    700 16px/1 "Manrope",
    sans-serif;
  color: var(--ink);
}
.financing-public .link-button {
  font-size: 13px;
  font-weight: 600;
}
.financing-public-bar {
  position: relative;
  height: 8px;
  border-radius: 4px;
  background: #eceff1;
}
.financing-public-bar span {
  display: block;
  height: 100%;
  max-width: 100%;
  border-radius: 4px;
  background: #5b7fa6;
}
.financing-public-bar i {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  margin-left: -1px;
  background: var(--ink);
  border-radius: 1px;
}
.financing-public.is-over .financing-public-bar span {
  background: #c47f12;
}
.financing-alert {
  margin: 14px 0 0;
  padding: 11px 14px;
  border: 1px solid #ecd29b;
  border-radius: 9px;
  background: #fff7e6;
  color: #6b4a00;
  font-size: 13.5px;
  line-height: 1.5;
}
.financing-alert b {
  color: #5a3d00;
}
.financing-payments-line {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--muted);
}
.financing-late {
  color: #8a5a00;
  font-weight: 600;
}
.financing-table tr.is-late td {
  background: #fffaf0;
}
.financing-table tr.is-received .financing-amount {
  color: var(--muted);
}
.financing-table .financing-unscheduled td {
  font-weight: 500;
  color: var(--muted);
}
.financing-date {
  white-space: nowrap;
}
.financing-received {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.financing-received input {
  width: auto;
  margin: 0;
  accent-color: var(--green);
}
.financing-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0 4px;
  cursor: pointer;
}
.financing-check input {
  width: auto;
  margin: 3px 0 0;
  flex: none;
  accent-color: var(--green);
}
.financing-check span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.financing-check small {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}
.financing-payment-list {
  display: grid;
  gap: 8px;
}
.financing-payment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}
.financing-payment input[type="date"],
.financing-payment input[type="number"] {
  width: 100%;
  margin: 0;
}
#fin-payments-sum.is-over {
  color: #8a5a00;
  font-weight: 600;
}
@media (max-width: 1000px) {
  .glance-grid,
  .financing-figures {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .phase-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .phase-side {
    align-items: flex-start;
    max-width: none;
  }
  .phase-hint {
    text-align: left;
  }
}
@media (max-width: 560px) {
  .financing-payment {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .phase-panel {
    padding: 18px 16px;
  }
  .phase-now {
    font-size: 24px;
  }
  .phase-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .phase-checklist {
    grid-template-columns: 1fr;
  }
  .location-grid,
  .financing-form-cols {
    grid-template-columns: 1fr;
  }
  .glance-value {
    font-size: 21px;
  }
  .financing-figure b {
    font-size: 19px;
  }
}

/* ---------- dark theme ---------- */
html.dark .pill.red {
  background: #3d1f22;
  color: #f19a9a;
}
html.dark .location-validated,
html.dark .financing-closed {
  background: #172131;
  border-color: #2f3543;
}
html.dark .phase-panel {
  background: #1e293b;
  border-color: #2f3543;
}
html.dark .phase-mode {
  background: #24372b;
  color: #96cb9a;
}
html.dark .phase-mode.is-manual {
  background: #3c2e0e;
  color: #d7a45c;
}
html.dark .phase-steps button {
  background: #262e3d;
}
html.dark .phase-steps button:hover {
  border-color: #455c4a;
}
html.dark .phase-steps li.selected button {
  border-color: #e2e8f0;
}
html.dark .phase-steps li.done button {
  background: #24372b;
  color: #96cb9a;
}
html.dark .phase-steps li.is-closed button {
  background: #20262f;
  color: #8792a0;
}
html.dark .glance-card.is-text:hover {
  border-color: #2f3543;
}
html.dark .phase-steps li.warn button {
  background: #3a2e17;
  color: #e3b36a;
}
html.dark .phase-steps li.done .phase-mark {
  background: #96cb9a;
  color: #14202b;
}
html.dark .phase-steps li.current button {
  background: var(--lime);
  color: var(--on-accent, #19232b);
}
html.dark .phase-bar {
  background: rgba(255, 255, 255, 0.12);
}
html.dark .phase-bar i {
  background: #7cc58a;
}
html.dark .phase-steps li.current .phase-bar {
  background: rgba(25, 35, 43, 0.2);
}
html.dark .phase-steps li.current .phase-bar i {
  background: var(--on-accent, #19232b);
}
html.dark .phase-detail,
html.dark .glance-card,
html.dark .financing-figure {
  background: #172131;
  border-color: #2f3543;
}
html.dark .phase-check {
  border-color: #4e5a68;
}
html.dark .phase-checklist li.is-ok .phase-check {
  border-color: #7cc58a;
  background: #7cc58a;
  color: #14202b;
}
html.dark .phase-checklist li.is-partial .phase-check {
  border-color: #d9822b;
  color: #e3a35a;
}
html.dark .phase-item-label a {
  text-decoration-color: rgba(226, 232, 240, 0.35);
}
html.dark .phase-optional {
  background: #2d3545;
}
html.dark .glance-card:hover {
  border-color: #455c4a;
}
html.dark .glance-alert {
  color: #e3a35a;
}
html.dark .financing-bar {
  background: #2d3545;
}
html.dark .financing-bar .is-confirmed,
html.dark .financing-legend .is-confirmed::before {
  background: #5fb873;
}
html.dark .financing-bar .is-expected {
  background: repeating-linear-gradient(135deg, #2f6b3e 0 6px, #3a7d4a 6px 12px);
}
html.dark .financing-legend span::before {
  background: #2d3545;
}
html.dark .financing-legend .is-expected::before {
  background: #3a7d4a;
}
html.dark .financing-figure.is-confirmed {
  box-shadow: inset 3px 0 0 #5fb873;
}
html.dark .financing-figure.is-expected {
  box-shadow: inset 3px 0 0 #3a7d4a;
}
html.dark .financing-table tfoot td {
  background: #262e3d;
}
html.dark .financing-target-choice label {
  border-color: #2f3543;
}
html.dark .financing-public-bar {
  background: #2d3545;
}
html.dark .financing-public-bar span {
  background: #7ea4cf;
}
html.dark .financing-public-bar i {
  background: #e2e8f0;
}
html.dark .financing-public.is-over .financing-public-bar span {
  background: #d7a45c;
}
html.dark .financing-alert {
  background: #3a2e17;
  border-color: #5c4a24;
  color: #e3c48a;
}
html.dark .financing-alert b {
  color: #f0d49c;
}
html.dark .financing-late,
html.dark #fin-payments-sum.is-over {
  color: #f0c36a;
}
html.dark .financing-table tr.is-late td {
  background: #2a2618;
}
/* Postproducció (sections/post.js): the versions of the cut, their notes and the key dates */
.post-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 18px;
  margin: 0 0 16px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfb;
}
.post-summary p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}
.post-summary b {
  color: var(--ink);
}
.post-cuts {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0 0 24px;
}
.post-cut {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.post-cut.is-approved {
  box-shadow: inset 3px 0 0 #6bbc7e;
}
.post-cut-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
}
.post-cut-head h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  line-height: 1.35;
}
.post-cut-meta {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}
.post-approved {
  margin-top: 6px;
  font-size: 13px;
  color: #3c6d41;
  font-weight: 550;
}
.post-cut-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.post-notes-box {
  border-top: 1px solid var(--line);
}
.post-notes-box > summary {
  padding: 11px 18px;
  font-size: 13.5px;
  font-weight: 550;
  color: var(--muted);
  cursor: pointer;
  list-style-position: inside;
}
.post-notes-box > summary:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: -2px;
}
.post-notes-box > .post-muted {
  margin: 0 18px 12px;
  font-size: 13.5px;
}
.post-muted {
  color: var(--muted);
}
.post-notes {
  list-style: none;
  margin: 0;
  padding: 0 18px;
}
.post-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid #eef0f2;
}
.post-note:first-child {
  border-top: 0;
}
.post-note-check {
  display: flex;
  padding-top: 2px;
}
.post-note-check input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #398151;
}
.post-tc {
  flex-shrink: 0;
  padding: 2px 7px;
  border-radius: 5px;
  background: #edf0f2;
  color: #40505c;
  font:
    600 12.5px/1.5 ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
}
.post-note-text {
  flex: 1;
  min-width: 0;
}
.post-note-text p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  overflow-wrap: anywhere;
  white-space: pre-line;
}
.post-note-text small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}
.post-note.is-done .post-note-text p {
  text-decoration: line-through;
  color: var(--muted);
}
.post-note-remove {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}
.post-note-remove:hover {
  background: #f0f3f5;
  color: var(--ink);
}
.post-note-form {
  display: flex;
  gap: 8px;
  padding: 10px 18px 14px;
}
.post-note-form input {
  margin: 0;
  padding: 8px 10px;
  font-size: 14px;
}
.post-note-form input[name="tc"] {
  flex: 0 0 112px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.post-note-form input[name="text"] {
  flex: 1;
  min-width: 0;
}
.post-note-form .button {
  flex-shrink: 0;
}
.post-empty {
  margin: 0 0 24px;
}
.post-empty h2 {
  margin-bottom: 8px;
}
.post-empty p {
  max-width: 720px;
  margin: 0 0 16px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--muted);
}
.post-dates {
  margin: 0 0 24px;
}
.post-date {
  align-items: center;
}
.post-date-text {
  flex: 1;
  min-width: 0;
}
.post-date-empty b {
  color: #9aa5ad;
}
.post-date .button {
  flex-shrink: 0;
}
.post-form-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}
.post-check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 550;
  margin: 0 0 6px;
}
.post-check input {
  width: 17px;
  height: 17px;
  accent-color: #398151;
}
.post-remove {
  margin-top: 6px;
  color: #a23b3b;
  border-color: #e8caca;
}
/* VFX, Música and Lliurables (petició del Daniel, 2026-10-25): the state chosen in the row, the proposals of the guió
   tècnic and the Desglossament, the versions of a shot, the cue sheet and the deliverables of each destination */
select.post-state {
  width: auto;
  max-width: 150px;
  margin: 0;
  padding: 7px 9px;
  font-size: 13.5px;
}
.post-vfx-text {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.post-vfx.is-omitted {
  opacity: 0.7;
}
.post-version .button {
  flex-shrink: 0;
  align-self: center;
}
.post-version-form input[name="name"] {
  flex: 0 0 92px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.post-version-form input[name="link"],
.post-version-form input[name="note"] {
  flex: 1;
  min-width: 0;
}
.post-proposals {
  margin: 0 0 18px;
}
.post-proposals > summary {
  padding: 14px 18px;
  font-size: 14px;
  cursor: pointer;
  list-style-position: inside;
}
.post-proposals > p {
  margin: 0 18px 8px;
  font-size: 13.5px;
  line-height: 1.55;
}
.post-proposals ul {
  list-style: none;
  margin: 0;
  padding: 0 18px;
  max-height: 340px;
  overflow: auto;
}
.post-proposal {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid #eef0f2;
}
.post-proposal > div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  font-size: 14px;
}
.post-proposal span {
  overflow-wrap: anywhere;
}
.post-proposal small {
  font-size: 12px;
  color: var(--muted);
}
.post-proposals-all {
  padding: 10px 18px 14px;
  border-top: 1px solid #eef0f2;
}
/* a proposal that is already a shot made by hand: «Ja és VFX_010? Vincular» (proves amb agents, ronda 3) */
.post-proposal > .post-proposal-twin {
  flex: 0 1 auto;
  align-items: center;
  gap: 6px 8px;
  justify-content: flex-end;
}
.post-proposal-twin > span {
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
}
/* the cue sheet: with the rights or without (proves amb agents, ronda 3) */
.post-cue-rights-choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
.post-cue-rights-choice input {
  margin: 0;
}
.post-cues {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  margin: 0 0 24px;
}
.post-cue {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 170px 230px auto;
  align-items: center;
  gap: 8px 16px;
  padding: 12px 16px;
  border-top: 1px solid #eef0f2;
}
.post-cue:first-child {
  border-top: 0;
}
.post-cue-n {
  font:
    650 14px "Manrope",
    sans-serif;
  color: var(--muted);
  text-align: right;
}
.post-cue-main h3 {
  font-size: 15px;
  line-height: 1.35;
}
.post-cue-main p {
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.post-cue-main .post-cue-use {
  color: #40505c;
}
.post-cue-tc {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font:
    600 12.5px/1.5 ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  color: #40505c;
}
.post-cue-tc small {
  font: inherit;
  font-weight: 500;
  color: var(--muted);
}
.post-cue-rights {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  color: var(--muted);
}
.post-right {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.post-right .pill {
  padding: 3px 7px;
}
/* the archive footage (sections/post.js, Arxiu): the cue's row, with its rights' terms and its licence */
.post-arch .post-cue-rights small {
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.post-arch-doc {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
}
.post-arch.is-denied {
  box-shadow: inset 3px 0 0 #c0392b;
}
.post-dest {
  margin: 0 0 18px;
}
.post-dest .panel-head {
  align-items: flex-start;
}
.post-dest .panel-head h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.post-dest-empty {
  margin: 0;
  padding: 14px 23px;
  font-size: 13.5px;
}
.post-items {
  list-style: none;
  margin: 0;
  padding: 0;
}
.post-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 23px;
  border-top: 1px solid #eef0f2;
}
.post-item:first-child {
  border-top: 0;
}
.post-item-mark {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 1.5px solid #c8d0d6;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.post-item.is-delivered .post-item-mark {
  background: #4f9a62;
  border-color: #4f9a62;
}
.post-item.is-skipped {
  opacity: 0.6;
}
.post-item-text {
  flex: 1;
  min-width: 0;
}
.post-item-text b {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
}
.post-item-text small {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.post-item-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
@media (max-width: 1100px) {
  .post-cue {
    grid-template-columns: 24px minmax(0, 1fr) auto;
  }
  .post-cue-tc,
  .post-cue-rights {
    grid-column: 2;
  }
  .post-cue-edit {
    grid-column: 3;
    grid-row: 1;
  }
  .post-cue-tc {
    flex-direction: row;
    gap: 10px;
  }
  .post-right {
    justify-content: flex-start;
  }
}
@media (max-width: 760px) {
  .post-version-form input[name="name"],
  .post-version-form input[name="link"],
  .post-version-form input[name="note"] {
    flex: 1 1 100%;
  }
  .post-proposal {
    flex-wrap: wrap;
  }
  .post-proposal > .post-proposal-twin {
    flex: 1 1 100%;
    justify-content: flex-start;
  }
  /* the two buttons of the cue sheet inside the card (ronda 3, agent 6: «Cue sheet: Excel» went past its edge) */
  .post-summary .post-cut-actions {
    flex: 1 1 100%;
    min-width: 0;
    flex-shrink: 1;
  }
  .post-cue {
    grid-template-columns: 24px minmax(0, 1fr);
    padding: 12px 14px;
  }
  .post-cue-tc,
  .post-cue-rights,
  .post-cue-edit {
    grid-column: 2;
  }
  .post-cue-edit {
    grid-row: auto;
  }
  .post-cue-tc {
    flex-direction: row;
    gap: 10px;
  }
  .post-right {
    justify-content: flex-start;
  }
  .post-item {
    flex-wrap: wrap;
    padding: 12px 14px;
  }
  .post-item-text {
    flex: 1 1 calc(100% - 40px);
  }
  .post-item-actions {
    flex: 1 1 100%;
    justify-content: flex-start;
    padding-left: 32px;
  }
  .post-dest .panel-head {
    flex-direction: column;
    padding: 16px 14px;
  }
  .post-cut-head {
    flex-direction: column;
    padding: 14px;
  }
  .post-cut-actions {
    justify-content: flex-start;
  }
  .post-notes {
    padding: 0 14px;
  }
  .post-notes-box > summary {
    padding: 11px 14px;
  }
  .post-note-form {
    flex-wrap: wrap;
    padding: 10px 14px 14px;
  }
  .post-note-form input[name="tc"] {
    flex: 1 1 100%;
  }
  .post-note-form input[name="text"] {
    flex: 1 1 100%;
  }
  .post-date {
    display: grid;
    grid-template-columns: 47px minmax(0, 1fr) auto;
    gap: 8px 14px;
  }
  .post-date .date-box {
    grid-row: 1 / span 2;
    align-self: start;
  }
  .post-date-text {
    grid-column: 2 / span 2;
  }
  .post-date .pill {
    grid-column: 2;
    justify-self: start;
    margin: 0;
  }
  .post-date .button {
    grid-column: 3;
  }
  .post-form-cols {
    grid-template-columns: 1fr;
  }
}
html.dark .post-summary {
  background: #172131;
  border-color: #2f3543;
}
html.dark .post-cut {
  background: #1e293b;
  border-color: #2f3543;
}
html.dark .post-notes-box,
html.dark .post-note {
  border-color: #2f3543;
}
html.dark .post-tc {
  background: #2d3545;
  color: #cbd5e1;
}
html.dark .post-approved {
  color: #96cb9a;
}
html.dark .post-note-remove:hover {
  background: #2d3545;
  color: #e2e8f0;
}
html.dark .post-remove {
  color: #f19a9a;
  border-color: #5a2f33;
}
html.dark .post-cues {
  background: #1e293b;
  border-color: #2f3543;
}
html.dark .post-cue,
html.dark .post-item,
html.dark .post-proposal,
html.dark .post-proposals-all {
  border-color: #2f3543;
}
html.dark .post-cue-tc,
html.dark .post-cue-main .post-cue-use {
  color: #cbd5e1;
}
html.dark .post-item-mark {
  border-color: #475569;
}
/* The fitxa of the project (sections/development.js): its logline, over the fields (informe de proves, Q12) */
.project-logline {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.55;
  font-style: italic;
  color: var(--ink);
}
/* Localitzacions without any to show (entities.js, locationsEmptyNiu): across the grid */
.media-grid > .media-empty {
  grid-column: 1/-1;
}
/* Documents and materials (informe de proves, Q14): the stills gallery of Distribució → Materials, a link and its
   password (forms/document.js, viewLinkDoc), the search and the filters of Documents */
.stills-panel {
  margin: 24px 0;
}
.stills-panel .media-grid {
  margin-top: 16px;
}
.link-view a {
  overflow-wrap: anywhere;
}
.link-password {
  font:
    14px/1.4 ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  padding: 2px 6px;
  border-radius: 5px;
  background: #f0f3f5;
  user-select: all;
}
html.dark .link-password {
  background: #1e293b;
}
.document-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 18px;
}
.document-filters .document-search {
  flex: 1 1 240px;
  max-width: 420px;
  margin: 0;
}
.document-filters select {
  width: auto;
  margin: 0;
}
.document-filters .document-count {
  color: var(--muted);
  font-size: 13px;
  margin-left: auto;
}
/* «Seccions on ha d’aparèixer» of a file, a link or a note (forms/document.js: areaPickerNiu), a dropdown that looks
   like a select (Daniel, 2026-11-06) */
.area-field {
  margin: 0 0 20px;
}
.area-field > .form-label {
  display: block;
  font-size: 14px;
  font-weight: 550;
  margin: 0 0 8px;
}
.area-picker {
  position: relative;
}
.area-picker > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 38px 10px 12px;
  border: 1px solid #cfd7dd;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
  cursor: pointer;
  position: relative;
}
.area-picker > summary::-webkit-details-marker {
  display: none;
}
.area-picker > summary::after {
  content: "";
  position: absolute;
  right: 15px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 2px solid #6a7781;
  border-bottom: 2px solid #6a7781;
  transform: rotate(45deg);
  transition: transform 0.15s;
}
.area-picker[open] > summary::after {
  transform: rotate(-135deg);
  margin-top: -2px;
}
.area-picker > summary:focus-visible {
  outline: 3px solid #18944a;
  outline-offset: 3px;
}
.area-picker [data-area-chosen] {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.area-picker [data-area-chosen].none {
  color: #976717;
}
.area-picker-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 260px;
  overflow: auto;
  padding: 6px;
  background: #fff;
  border: 1px solid #dfe5e9;
  border-radius: 9px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
}
.area-picker-list label {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}
.area-picker-list label:hover {
  background: #eef4f0;
}
.area-picker-list input {
  accent-color: var(--green);
  width: 17px;
  height: 17px;
  margin: 0;
  flex: none;
}
html.dark .area-picker > summary {
  background: #1e293b;
  border-color: #3b4350;
  color: #e2e8f0;
}
html.dark .area-picker-list {
  background: #1e293b;
  border-color: #334155;
}
html.dark .area-picker-list label:hover {
  background: #26364a;
}
html.dark .area-picker [data-area-chosen].none {
  color: #f2c46d;
}
/* Documents → «+ Nou» (sections/documents.js): from a template, a document, a file or a link */
.new-doc-menu {
  position: relative;
  display: inline-block;
}
.new-doc-menu > summary {
  list-style: none;
  cursor: pointer;
}
.new-doc-menu > summary::-webkit-details-marker {
  display: none;
}
.new-doc-list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: 330px;
  max-width: calc(100vw - 32px);
  padding: 6px;
  background: #fff;
  border: 1px solid #dfe5e9;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
}
.new-doc-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.new-doc-item:hover,
.new-doc-item:focus-visible {
  background: #eef4f0;
}
.new-doc-item b {
  font-size: 14px;
}
.new-doc-item small {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.35;
}
/* each option with its icon (forms/document.js: newDocItemNiu; Daniel, 2026-11-06) */
.new-doc-item.with-icon {
  flex-direction: row;
  align-items: flex-start;
  gap: 11px;
}
.new-doc-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #ecf4ec;
  color: #3f7b51;
}
.new-doc-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.new-doc-item:hover .new-doc-icon,
.new-doc-item:focus-visible .new-doc-icon {
  background: #dcebdf;
}
html.dark .new-doc-icon {
  background: #24402f;
  color: #8fdca5;
}
html.dark .new-doc-item:hover .new-doc-icon,
html.dark .new-doc-item:focus-visible .new-doc-icon {
  background: #2d5039;
}
html.dark .new-doc-list {
  background: #1e293b;
  border-color: #334155;
}
html.dark .new-doc-item:hover,
html.dark .new-doc-item:focus-visible {
  background: #26364a;
}
/* Nou projecte: the usual countries first (v03.js, projectChoices03) */
.country-options .country-group {
  grid-column: 1/-1;
  margin: 6px 0 0;
  font-size: 11.5px !important;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.country-options .country-group:first-child {
  margin-top: 0;
}
.country-options .country-group[hidden] {
  display: none;
}
/* a button that can't be used now looks off (informe de proves 2026-10-13: «Exportar» of Rodatge) */
.button:disabled,
.button[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

/* Mòbil (informe de proves 2026-10-13). M2: the strip «Ara» of the Resum (sections/overview.js), only on the phone */
.now-strip {
  display: none;
}
@media (max-width: 760px) {
  .now-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 16px;
  }
  .now-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fbfcfb;
    color: inherit;
    text-decoration: none;
  }
  .now-item span {
    font-size: 10.5px;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .now-item b {
    font-size: 15px;
    line-height: 1.25;
  }
  .now-item small {
    font-size: 12px;
    line-height: 1.35;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
  }
  .now-item.is-late small {
    color: #a23b3b;
    font-weight: 550;
  }
  html.dark .now-item {
    background: #172131;
    border-color: #2f3543;
  }
  html.dark .now-item.is-late small {
    color: #f19a9a;
  }
  /* M7: the menu's shadow only when it is open */
  aside#sidebar {
    box-shadow: none;
  }
  body.menu-open aside#sidebar {
    box-shadow: 15px 0 30px #0002;
  }
}
/* M6: Qualificacions, rows to touch (44 px) and boxes that can be seen in the dark theme */
.qualification-options label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
}
.qualification-options input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 2px solid #8a97a3;
  border-radius: 6px;
  background: #fff;
  display: inline-grid;
  place-content: center;
  cursor: pointer;
}
.qualification-options input[type="checkbox"]::before {
  content: "";
  width: 11px;
  height: 6px;
  border: solid #fff;
  border-width: 0 0 2.5px 2.5px;
  transform: translateY(-1px) rotate(-45deg);
  opacity: 0;
}
.qualification-options input[type="checkbox"]:checked {
  background: #3c6d41;
  border-color: #3c6d41;
}
.qualification-options input[type="checkbox"]:checked::before {
  opacity: 1;
}
.qualification-options input[type="checkbox"]:focus-visible {
  outline: 2px solid #3c6d41;
  outline-offset: 2px;
}
html.dark .qualification-options label {
  border-color: #2f3543;
}
html.dark .qualification-options input[type="checkbox"] {
  background: #0f172a;
  border-color: #94a3b8;
}
html.dark .qualification-options input[type="checkbox"]:checked {
  background: #7cc58a;
  border-color: #7cc58a;
}
html.dark .qualification-options input[type="checkbox"]::before {
  border-color: #14202b;
}
/* a long dialog (Nou projecte with every country…): its buttons always in sight, as on the phone (alpha.css) */
#dialog .dialog-actions {
  position: sticky;
  bottom: 0;
  z-index: 1;
}

/* Distribució → Festivals (sections/distribution.js, festivalsView): the candidatures at a glance, one line each, and
   «Estat de les candidatures» beside them; the Festival Hub and the saved versions below */
.festival-top {
  display: grid;
  grid-template-columns: minmax(300px, 2fr) 3fr;
  gap: 20px;
  margin-bottom: 24px;
  align-items: stretch;
}
.festival-glance {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-content: stretch;
}
.fg-row {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: 118px 76px 1fr 18px;
  grid-template-columns: subgrid;
  align-items: baseline;
  align-content: center;
  column-gap: 14px;
  padding: 12px 20px;
  border-top: 1px solid #eef0f2;
}
.fg-row:first-child {
  border-top: 0;
}
.fg-label {
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}
.fg-value {
  font:
    700 22px/1.3 "Manrope",
    sans-serif;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.fg-sub {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  min-width: 0;
}
.fg-row svg {
  width: 18px;
  height: 18px;
  color: #83918e;
  align-self: center;
  grid-row: 1;
  grid-column: 4;
}
html.dark .fg-row {
  border-color: #2f3543;
}
@media (max-width: 980px) {
  .festival-top {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 520px) {
  .fg-row {
    padding: 11px 16px;
    column-gap: 10px;
  }
  .fg-sub {
    grid-column: 2/4;
  }
}

/* Desenvolupament → Dossier (sections/development.js): the two dossiers, each with its cover as the editor draws it
   (apps/dossier/render.js: a page of 1000 units, scaled here), and the frames that draw them, out of sight */
.dossier-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  align-items: start;
}
.dossier-card {
  overflow: hidden;
}
.dossier-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.dossier-card-head h2 {
  margin: 0;
}
.dossier-card .panel-body > p {
  margin: 8px 0;
}
.dossier-card .panel-body > .row-buttons {
  margin-top: 14px;
}
.dossier-card .panel-body > .notice {
  margin: 10px 0 0;
}
/* Desenvolupament → Tractament i escaleta (sections/development.js: roleDocs): the escaleta's scenes, numbered, with their minutes */
/* «Crear el tractament» (with the skeleton or blank) and «Passar l’estructura a l’escaleta» (append or replace) */
label.treatment-kind {
  align-items: flex-start !important;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
}
label.treatment-kind:has(input:checked) {
  border-color: #6bbc7e;
  background: #f2f8f3;
}
label.treatment-kind input {
  margin-top: 3px;
  width: auto;
  flex: none;
}
label.treatment-kind span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
label.treatment-kind b {
  font-size: 14.5px;
}
label.treatment-kind small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
html.dark label.treatment-kind {
  border-color: #334155;
}
html.dark label.treatment-kind:has(input:checked) {
  border-color: #4f8d61;
  background: #1d3326;
}
.role-doc-missing {
  margin: -4px 0 12px;
  font-size: 13.5px;
}
/* the purpose of the treatment and of the escaleta, on the title (Daniel, 2026-11-06: «així queda més net») */
.role-doc-name {
  position: relative;
}
.role-doc-name > span:first-child {
  cursor: help;
  text-decoration: underline dotted 1px;
  text-underline-offset: 5px;
  text-decoration-color: var(--muted, #8a969e);
}
.role-doc-tip {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 25;
  width: max-content;
  max-width: min(340px, 78vw);
  padding: 9px 11px;
  border-radius: 9px;
  background: #19232b;
  color: #f4f7f5;
  font-size: 13px;
  font-weight: 450;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.22);
}
.role-doc-name:hover .role-doc-tip,
.role-doc-name:focus-within .role-doc-tip {
  display: block;
}
.role-doc-name.tip-off .role-doc-tip {
  display: none;
}
.role-doc-card {
  overflow: visible;
} /* the tip goes out of the card */
html.dark .role-doc-tip {
  background: #e8eef0;
  color: #19232b;
}
.outline-scenes {
  list-style: none;
  margin: 14px 0 4px;
  padding: 0;
  border: 1px solid var(--line, #e4e8eb);
  border-radius: 12px;
  overflow: hidden;
}
.outline-scenes li {
  display: grid;
  grid-template-columns: 2em minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  padding: 8px 12px;
  border-top: 1px solid var(--line, #e4e8eb);
  font-size: 0.92rem;
}
.outline-scenes li:first-child {
  border-top: 0;
}
.outline-n {
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.outline-h {
  font-weight: 600;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.outline-h.outline-none {
  font-weight: 450;
  text-transform: none;
  font-style: italic;
  color: var(--muted);
}
.outline-m {
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
/* the kinds of scene (dist/sections/development.js: outlineKinds) */
.outline-k {
  display: inline-block;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: none;
  white-space: nowrap;
  color: #5d6770;
  background: #eef1f3;
  vertical-align: 1px;
}
.outline-k.k-entrevista {
  color: #1f5f9e;
  background: #e7f0fa;
}
.outline-k.k-observacio {
  color: #2f6b3f;
  background: #e8f4ea;
}
.outline-k.k-arxiu {
  color: #8a5a12;
  background: #f8efdc;
}
.outline-k.k-recreacio {
  color: #6a3f9e;
  background: #f0e9f8;
}
.outline-k.k-off {
  color: #1f6b6e;
  background: #e2f2f2;
}
html.dark .outline-k {
  color: #c3ccd3;
  background: #2b3949;
}
html.dark .outline-k.k-entrevista {
  color: #a9cdec;
  background: #1d3045;
}
html.dark .outline-k.k-observacio {
  color: #afe0ba;
  background: #1e3526;
}
html.dark .outline-k.k-arxiu {
  color: #f0c674;
  background: #3b2f1a;
}
html.dark .outline-k.k-recreacio {
  color: #d4bdf2;
  background: #33264a;
}
html.dark .outline-k.k-off {
  color: #9fdcdc;
  background: #1b3738;
}
.outline-kinds {
  list-style: none;
  margin: 10px 0 4px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 0.88rem;
  color: var(--muted);
}
.outline-kinds .outline-k {
  margin-right: 4px;
}
/* the minutes by location and by person interviewed (dist/sections/development.js: outlineTotals), folded */
.outline-totals {
  margin: 8px 0 0;
  border: 1px solid var(--line, #e4e8eb);
  border-radius: 10px;
}
.outline-totals > summary {
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
.outline-totals > summary small {
  font-weight: 500;
  color: var(--muted);
}
.outline-totals ul {
  list-style: none;
  margin: 0;
  padding: 0 12px 8px;
}
.outline-totals li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 5px 0;
  border-top: 1px solid var(--line, #e4e8eb);
  font-size: 0.9rem;
}
.outline-totals li > span:last-child {
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.outline-total-name {
  overflow-wrap: anywhere;
}
.outline-total-name small {
  color: var(--muted);
}
/* the fitxa of an interviewee: the release not signed yet, with interviews in the escaleta (dist/breakdown.js) */
.notice.cs-release-warning {
  margin: 12px 0 0;
  background: #fff4dd;
  border-color: #f1dfb5;
  color: #8a5a12;
}
html.dark .notice.cs-release-warning {
  background: #3b2f1a;
  border-color: #5c4620;
  color: #f0c674;
}
.dossier-mini {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #e9ecee;
  border-bottom: 1px solid var(--line, #e4e8eb);
}
.dossier-mini.is-drawn {
  aspect-ratio: auto;
}
html.dark .dossier-mini {
  background: #243140;
}
.dossier-mini-wait {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted, #697580);
  font-size: 13px;
}
.dossier-mini .page {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  overflow: hidden;
}
.dossier-mini .el {
  position: absolute;
}
.dossier-mini .el-text {
  overflow: hidden;
  white-space: normal;
  overflow-wrap: break-word;
}
.dossier-mini .el-text p {
  margin: 0 0 0.55em;
}
.dossier-mini .el-text p:last-child {
  margin-bottom: 0;
}
.dossier-mini .el-text ul {
  margin: 0;
  padding-left: 1.1em;
}
.dossier-mini .el-text li {
  margin: 0 0 0.3em;
}
.dossier-mini .el-image {
  background-position: center;
  background-repeat: no-repeat;
}
.dossier-mini .el-logos {
  display: flex;
  align-items: center;
  gap: 22px;
}
.dossier-mini .el-logos img {
  height: 100%;
  width: auto;
  max-width: 45%;
  object-fit: contain;
}
.dossier-mini .el-logos[data-tone="white"] img {
  filter: brightness(0) invert(1);
}
.dossier-mini .el-logos[data-tone="black"] img {
  filter: brightness(0);
}
.dossier-mini .el-laurel svg {
  width: 100%;
  height: 100%;
}
/* «Plantilla de Turonet» | «Fitxer»: a dossier made elsewhere, as a PDF (sections/development.js) */
.dossier-sources {
  display: flex;
  gap: 4px;
  padding: 10px 23px;
  border-bottom: 1px solid var(--line, #e4e8eb);
}
.dossier-source {
  border: 1px solid transparent;
  background: none;
  color: var(--muted, #697580);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.dossier-source:hover {
  color: inherit;
  background: var(--hover, #f1f3f4);
}
.dossier-source.is-active {
  color: inherit;
  background: var(--chip, #e9ecee);
  border-color: var(--line, #d8dee2);
}
.dossier-source:focus-visible {
  outline: 2px solid var(--focus, #2f6fed);
  outline-offset: 2px;
}
.dossier-source-mark {
  color: var(--green, #2f9e5b);
  font-size: 9px;
  vertical-align: 2px;
}
html.dark .dossier-source:hover {
  background: #2b3a4a;
}
html.dark .dossier-source.is-active {
  background: #2b3a4a;
  border-color: #3a4b5d;
}
.dossier-file-mini.is-drawn {
  aspect-ratio: auto;
  background: #e9ecee;
}
.dossier-file-mini img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 440px;
  object-fit: contain;
  margin: auto;
}
.dossier-file-mini.is-empty .dossier-mini-wait {
  font-size: 14px;
}
.dossier-use {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.dossier-use select {
  width: auto;
  margin: 0;
  padding: 4px 8px;
  font-size: 13px;
}
.collage-formats {
  justify-content: flex-end;
  margin-top: 10px;
}
#dossier-frames {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 1000px;
  height: 600px;
  visibility: hidden;
  pointer-events: none;
  overflow: hidden;
}
#dossier-frames iframe {
  width: 1000px;
  height: 600px;
  border: 0;
}
/* Rodatge → Pla de rodatge: the days, their call sheets and the day out of days (sections/production.js; tanda 3 of the
   call sheet, 2026-10-19) */
.plan-days,
.plan-dood {
  margin: 22px 0;
}
.plan-loading {
  margin: 22px 0;
}
.plan-old {
  margin: 22px 0;
}
/* the summary comes from a guió tècnic that has changed since (sections/production.js: planStale; proves amb agents,
   ronda 4, a2-1, 2026-10-30) */
.plan-stale {
  margin: 22px 0;
  background: #fff7e6;
  border-color: #f1dcae;
  color: #7a5512;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  flex-wrap: wrap;
}
.plan-stale p {
  margin: 0;
  flex: 1 1 320px;
}
html.dark .plan-stale {
  background: #3a3222;
  border-color: #5a4a2a;
  color: #e3c48a;
}
.plan-days .panel-head,
.plan-dood .panel-head {
  align-items: flex-start;
  padding: 18px 23px;
}
/* folded at first: the title and the line under it (sections/production.js: planPanel) */
.plan-fold > summary {
  cursor: pointer;
  list-style: none;
  border-bottom: 0;
}
.plan-fold > summary::-webkit-details-marker {
  display: none;
}
.plan-fold > summary:hover {
  background: rgba(127, 140, 150, 0.06);
}
.plan-fold > summary:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: -2px;
}
.plan-fold[open] > summary {
  border-bottom: 1px solid var(--line);
}
.plan-fold > summary > div {
  flex: 1;
  min-width: 0;
}
.plan-chevron {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  align-self: center;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  margin: 0 4px 4px 6px;
  transition: transform 0.15s;
}
.plan-fold[open] .plan-chevron {
  transform: rotate(-135deg);
  margin-bottom: -4px;
}
.plan-rests {
  align-self: center;
  white-space: nowrap;
  font-size: 13.5px;
}
@media (max-width: 760px) {
  .plan-fold > summary {
    flex-wrap: wrap;
    row-gap: 6px;
  }
  .plan-fold > summary > div {
    flex: 1 1 calc(100% - 40px);
  }
  .plan-rests {
    order: 3;
    flex-basis: 100%;
  }
} /* on a phone, the short rests under the text */
html.dark .plan-fold > summary:hover {
  background: rgba(148, 163, 184, 0.08);
}
html.dark .plan-fold[open] > summary {
  border-color: #2f3543;
}
.plan-days .subtitle,
.plan-dood .subtitle {
  font-size: 13.5px;
  margin-top: 4px;
  max-width: 820px;
}
.plan-day {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  gap: 6px 18px;
  align-items: center;
  padding: 14px 23px;
  border-top: 1px solid #eef0f2;
}
.plan-day:first-child {
  border-top: 0;
}
.plan-day-when {
  text-decoration: none;
  color: var(--ink);
}
.plan-day-when b {
  display: block;
  font:
    700 15px "Manrope",
    sans-serif;
}
.plan-day-when small {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}
.plan-day-when:hover b {
  text-decoration: underline;
}
.plan-day-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  min-width: 0;
}
.plan-day-main small {
  font-size: 12.5px;
  color: var(--muted);
}
.plan-day-main .plan-warn,
.plan-warn {
  color: #976717;
  font-weight: 600;
}
.plan-sheet {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 12.5px;
  color: var(--muted);
}
.plan-sheet .pill {
  padding: 3px 7px;
}
.plan-sheet.is-none {
  font-style: italic;
}
.plan-changed {
  color: #b3412f;
}
.pd-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 14px 23px 0;
  font-size: 12.5px;
}
.pd-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pd-scroll {
  overflow: auto;
  padding: 12px 0 8px;
}
.pd-table {
  width: auto;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.pd-table th,
.pd-table td {
  padding: 0;
  border: 0;
  background: transparent;
  letter-spacing: 0;
}
.pd-table .pd-name {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  text-align: left;
  min-width: 180px;
  max-width: 220px;
  padding: 6px 14px 6px 23px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid #eef0f2;
  font-size: 13px;
  color: var(--ink);
  font-weight: 400;
  white-space: nowrap;
}
.pd-table .pd-name b {
  display: block;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pd-table .pd-name small {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pd-table thead .pd-name {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
  border-bottom-color: var(--line);
}
.pd-table .pd-day {
  min-width: 44px;
  text-align: center;
  padding: 6px 3px;
  border-bottom: 1px solid var(--line);
  font-weight: 400;
}
.pd-table .pd-day b {
  display: block;
  font:
    800 12px "Manrope",
    sans-serif;
  color: var(--ink);
}
.pd-table .pd-day small {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  margin: 0;
}
.pd-table .is-unit2 {
  background: #fafbfb;
}
.pd-table .pd-cell {
  text-align: center;
  height: 38px;
  border-bottom: 1px solid #eef0f2;
}
.pd-table .pd-sum {
  text-align: center;
  min-width: 56px;
  padding: 0 8px;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid #eef0f2;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.pd-table thead .pd-sum {
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom-color: var(--line);
}
.pd-table .pd-sum.is-total {
  color: var(--ink);
  font-weight: 800;
}
.pd-chip {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 22px;
  padding: 0 4px;
  border-radius: 6px;
  font:
    800 11px "Manrope",
    sans-serif;
  font-style: normal;
  border: 1px solid transparent;
}
.pd-chip.is-SW,
.pd-chip.is-WF,
.pd-chip.is-SWF {
  background: var(--lime);
  color: #183221;
}
.pd-chip.is-W {
  background: #e0f3e5;
  color: #3d7a3f;
  border-color: #c5e6ce;
}
.pd-chip.is-H {
  background: #fff4dd;
  color: #a86410;
  border-color: #f1dcae;
}
.pd-chip.has-rest {
  box-shadow: 0 0 0 2px #c03a2b;
}
.pd-legend .pd-chip {
  min-width: 24px;
  height: 20px;
  font-size: 10.5px;
}
.pd-table .pd-foot {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  border-bottom: 0;
  height: 32px;
}
.pd-table th.pd-foot {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
html.dark .plan-day {
  border-color: #2f3543;
}
html.dark .pd-table td {
  border-top: 0;
}
html.dark .pd-table .pd-name {
  background: #1e293b;
  border-color: #2f3543;
}
html.dark .pd-table .pd-day,
html.dark .pd-table .pd-cell,
html.dark .pd-table .pd-sum {
  border-color: #2f3543;
}
html.dark .pd-table .is-unit2 {
  background: #242f3d;
}
html.dark .pd-chip.is-W {
  background: #203627;
  color: #86c78a;
  border-color: #34483a;
}
html.dark .pd-chip.is-H {
  background: #3b2f1a;
  color: #f0c674;
  border-color: #5a4826;
}
html.dark .plan-warn,
html.dark .plan-day-main .plan-warn {
  color: #d7a45c;
}
html.dark .plan-changed {
  color: #f87171;
}
@media (max-width: 760px) {
  .plan-day {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px 16px;
  }
  .plan-day .button {
    justify-self: start;
  }
  .plan-days .panel-head,
  .plan-dood .panel-head {
    padding: 16px;
  }
  .pd-table .pd-name {
    min-width: 140px;
    max-width: 160px;
    padding-left: 16px;
  }
  .pd-legend {
    padding: 12px 16px 0;
  }
}
/* Ajudes i subvencions: the documents of a call's bases, each one with the «+ Nou» of Documents, and its requirements
   (sections/finance.js: grantPanel; proves amb agents, ronda 2, A4) */
.grant-panel .grant-amount {
  margin: 12px 0 0;
  font-size: 14px;
}
/* the detail of the bases (sections/finance.js): the links and buttons, the modality, and the lists of «Requisits» */
.grant-panel .grant-links {
  margin-top: 12px;
}
.grant-count {
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #e7f3eb;
  color: #3c6d41;
}
.grant-count.is-open {
  background: #fff3d9;
  color: #976717;
}
.grant-modality {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 12px 0 0;
  font-size: 14px;
}
.grant-modality span {
  font-weight: 600;
}
.grant-modality select {
  max-width: 100%;
  min-width: 0;
  flex: 1 1 260px;
}
.grant-items {
  list-style: none;
  margin: 6px 0 14px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.grant-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.grant-item-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 13px;
  background: #edf0f2;
  color: #6b7780;
}
.grant-item.is-ok .grant-item-mark {
  background: #e7f3eb;
  color: #3c6d41;
}
.grant-item.is-missing .grant-item-mark {
  background: #fde8e6;
  color: #a33a2c;
}
.grant-item.is-check .grant-item-mark {
  background: #fff3d9;
  color: #976717;
}
.grant-item-text p {
  margin: 0;
  line-height: 1.45;
}
.grant-item-text small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.4;
}
.grant-item-actions {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.grant-item-actions:empty {
  display: none;
}
#dialog-body .grant-detail h3 {
  margin: 18px 0 6px;
  font-size: 15px;
}
#dialog-body .grant-detail h3:first-of-type {
  margin-top: 10px;
}
#dialog-body .grant-detail p {
  margin: 0 0 8px;
}
#dialog-body .grant-detail .grant-item-text p {
  margin: 0;
}
#dialog-body .grant-detail .cat-list {
  margin: 0 0 6px;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.5;
}
#dialog-body .grant-detail .row-buttons {
  margin-top: 14px;
}
html.dark .grant-count {
  background: #2d3545;
  color: #96cb9a;
}
html.dark .grant-count.is-open {
  background: #3c2e0e;
  color: #d7a45c;
}
html.dark .grant-item-mark {
  background: #2d3545;
  color: #a2aeb8;
}
html.dark .grant-item.is-ok .grant-item-mark {
  background: #22362a;
  color: #96cb9a;
}
html.dark .grant-item.is-missing .grant-item-mark {
  background: #3d2220;
  color: #f2a49b;
}
html.dark .grant-item.is-check .grant-item-mark {
  background: #3c2e0e;
  color: #d7a45c;
}
.grant-docs-title {
  margin: 0;
  padding: 6px 23px 0;
  font-size: 15px;
}
.grant-doc-add {
  justify-content: center;
}
@media (max-width: 760px) {
  .grant-docs-title {
    padding: 4px 18px 0;
  }
  .grant-doc-menu .new-doc-list {
    right: auto;
    left: 0;
  }
}
/* the calls of the BDNS not reviewed yet (Cercar convocatòries) and the official record of a call (finance.js: bdnsHtml) */
.cat-bdns {
  margin: 22px 0 0;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.cat-bdns > summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
}
.cat-bdns > summary::-webkit-details-marker {
  display: none;
}
.cat-bdns > summary::before {
  content: "";
  width: 8px;
  height: 8px;
  border: solid var(--muted);
  border-width: 0 2px 2px 0;
  transform: rotate(-45deg);
  transition: transform 0.15s;
  flex: none;
  margin: 0 2px;
}
.cat-bdns[open] > summary::before {
  transform: rotate(45deg);
}
.cat-bdns > summary:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
.cat-bdns > .subtitle {
  margin: 2px 0 14px;
}
.grant-bdns .subtitle {
  margin: 10px 0 0;
  font-size: 13px;
}
.grant-bdns .row-buttons {
  margin-top: 10px;
}
/* «La teva àrea» del Resum (sections/overview.js; ronda 4): the figures of this person's area, each one a link */
.area-block {
  margin: 0 0 22px;
}
.area-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 12px;
}
.area-head h2 {
  font-size: 17px;
}
.area-stats {
  margin-bottom: 0;
}
.area-stat {
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}
.area-stat:hover {
  border-color: #8bb094;
}
.area-stat .stat-value {
  font-size: 22px;
  overflow-wrap: anywhere;
}
html.dark .area-stat:hover {
  border-color: #4d7a5a;
}
@media (max-width: 760px) {
  .area-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* the notes still to do of the versions before the latest (sections/post.js; ronda 4) */
.post-earlier {
  margin: -6px 0 16px;
  padding: 9px 14px;
  border-radius: 8px;
  background: #fff4dc;
  color: #5c4108;
  font-size: 14px;
}
html.dark .post-earlier {
  background: #2a2312;
  color: #f1d9a0;
}
.post-pending {
  margin: 14px 0 0 !important;
  font-size: 14px;
}
/* Tasques: the deadlines of the Festival Hub (sections/tasks.js; ronda 4) */
.task-festivals {
  margin: 0 0 22px;
}
.task-festivals .panel-head a {
  flex-shrink: 0;
}
.task-festival .pill {
  flex-shrink: 0;
}
@media (max-width: 760px) {
  .task-festivals .panel-head {
    flex-wrap: wrap;
  }
}

/* the cash flow in Finançament → Resum (sections/finance.js: cashflowPanel; Daniel, 2026-10-28) */
.cashflow-panel {
  margin-bottom: 24px;
}
.cashflow-panel table td,
.cashflow-panel table th {
  padding: 11px 23px;
}
.cashflow-panel tr.cashflow-now td {
  background: #eef5fb;
}
.cashflow-panel tr.cashflow-late td {
  color: #c03a2b;
}
.cashflow-note {
  font-size: 12.5px;
  color: var(--muted);
  padding-top: 12px !important;
  padding-bottom: 16px !important;
}
html.dark .cashflow-panel tr.cashflow-now td {
  background: #1c2f45;
}
html.dark .cashflow-panel tr.cashflow-late td {
  color: #f87171;
}
@media (max-width: 760px) {
  .cashflow-panel table td,
  .cashflow-panel table th {
    padding: 10px 14px;
    white-space: normal;
  }
}
/* Finançament → Llibre de despeses (N6, decisió 15): an invoice anul·lada, struck through; a paid one, its lock */
.book-table tr.is-void td:not(:last-child) {
  text-decoration: line-through;
  color: var(--muted);
}
.book-table .book-paid svg {
  width: 12px;
  height: 12px;
  margin-right: 4px;
  vertical-align: -1px;
}
.book-table td.right,
.book-table th.right {
  text-align: right;
  white-space: nowrap;
}

/* N6: several budgets and guions tècnics (their cards: shooting.js, copyCardNiu), the book, the Resum */
.copy-card.is-in-force {
  border-color: var(--green, #2f7d4f);
}
.new-copy-card {
  border: 1.5px dashed var(--line-strong, #c9d1d6);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 170px;
  color: var(--muted, #697580);
  font-weight: 600;
  text-decoration: none;
}
.new-copy-card:hover,
.new-copy-card:focus-visible {
  border-color: var(--accent, #356745);
  color: var(--ink, #1b2731);
}
.budget-from {
  margin: -6px 0 14px;
}
.book-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-weight: 600;
}
.book-copy select {
  max-width: 320px;
}
.book-table [data-book-assign] {
  font-size: 0.85em;
}
/* «Versions N ▾» of a document's card: open, the card the whole row wide with its versions (Daniel, 2026-11-19) */
/* (Daniel, 2026-11-19: a layer over the page, the cards where they are) */
.copy-card {
  position: relative;
  overflow: visible;
}
.copy-card.is-open {
  z-index: 30;
}
.copy-versions-layer {
  position: absolute;
  top: calc(100% - 8px);
  left: 0;
  width: min(640px, calc(100vw - 48px));
  max-height: min(60vh, 480px);
  overflow: auto;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line, #e4e8eb);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(25, 35, 43, 0.18);
}
html.dark .copy-versions-layer {
  background: #1e293b;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
/* the Festival Hub: its layer under its buttons, at the right (Daniel, 2026-11-19) */
.hub-panel > .panel-body > .copy-versions-layer {
  left: auto;
  right: 0;
}
.copy-versions-layer.is-right {
  left: auto;
  right: 0;
}
.copy-versions-layer > p {
  margin: 6px 8px;
}
.copy-versions-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.copy-versions-count {
  color: var(--muted);
  font-weight: 500;
}
.copy-version-list {
  margin: 0;
}

/* the backstory in «Editar personatge» (N9): its name and «Obrir», or «Crear-lo» */
.backstory-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 4px 0 12px;
}

/* Sèries i episodis (N4, pas 2): the guions of a series, a group per episode (shooting.js, episodeCardsNiu) */
.episode-groups {
  display: grid;
  gap: 22px;
}
.episode-group {
  display: grid;
  gap: 10px;
}
.episode-head {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
}
.episode-head .button {
  font-weight: 500;
}
.episode-archived summary {
  cursor: pointer;
  color: var(--muted);
}
.episode-archived ul {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.episode-archived li {
  display: flex;
  align-items: center;
  gap: 12px;
}
/* «Deixar de ser una sèrie»: what stays in the pla de rodatge without a guió (a warning, not a confirmation) */
.notice.series-plan-warning {
  border-color: #f0d9a8;
  background: #fff6e0;
  color: #7a5310;
}
html.dark .notice.series-plan-warning {
  border-color: #6b5320;
  background: #3a2e12;
  color: #f3d999;
}
.series-season input {
  max-width: 120px;
}
.series-prefix {
  border: 0;
  padding: 0;
  margin: 14px 0 0;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.series-prefix legend {
  padding: 0;
  margin-bottom: 8px;
}
.series-prefix label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-variant-numeric: tabular-nums;
}
.series-prefix input[type="radio"] {
  width: auto;
  margin: 0;
  accent-color: var(--green);
}
/* «Deixar de ser una sèrie»: which episode stays (series.js) */
.series-keep {
  border: 0;
  padding: 0;
  margin: 10px 0;
  display: grid;
  gap: 8px;
}
.series-keep legend {
  padding: 0;
  margin-bottom: 8px;
}
.series-keep label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.series-keep input[type="radio"] {
  width: auto;
  margin: 0;
  accent-color: var(--green);
}
/* «També un guió amb tots els episodis junts» (N4, pas 6); «Recuperar els episodis d’abans» */
.series-join,
.series-restore {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 10px;
}
.series-join input[type="checkbox"],
.series-restore input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: var(--green);
}
/* (with «Tots els episodis junts» it has nothing to add: it was told to hide and stayed in sight, a flex) */
.series-join[hidden] {
  display: none;
}
/* the Resum of a series: «Episodis» (series.js, episodesPanelNiu) */
[data-episodes-progress] {
  margin-bottom: 20px;
}
.episodes-progress {
  width: 100%;
  border-collapse: collapse;
}
.episodes-progress th,
.episodes-progress td {
  padding: 9px 14px;
  text-align: left;
  border-top: 1px solid var(--line);
  white-space: nowrap;
}
.episodes-progress thead th {
  border-top: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.episodes-progress tbody th {
  font-weight: 600;
}
.episodes-progress tbody th span {
  font-weight: 400;
  color: var(--muted);
  margin-left: 6px;
}
.ep-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: inherit;
  text-decoration: none;
}
.ep-state:hover {
  text-decoration: underline;
}
.ep-state i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}
.ep-state.is-vigent i {
  background: var(--green);
}
.ep-state.is-saved i {
  background: #d9a514;
}
.ep-state.is-none {
  color: var(--muted);
}
[data-series-start][hidden] {
  display: none;
}
.series-start {
  margin: 4px 0 14px;
}
.series-start .series-prefix {
  margin-bottom: 4px;
}
