/*
 *  Construction Decision – office pages: what media/style.css (the Admintool design system, unchanged) does
 *  not have yet. Tokens only, no new colours. Targets: 24 px with a mouse, 44 px under (pointer: coarse).
 */

/* development postbox on (Z2): impossible to miss */
.devbar { display: flex; align-items: center; justify-content: center; gap: var(--s-2); margin: 0; padding: var(--s-2) var(--s-4); background: var(--warn-soft); color: var(--warn-text); font-weight: 700; font-size: var(--fs-sm); text-align: center; border-bottom: 1px solid var(--warn-fill); }

/* top bar: brand on a phone (the sidebar is gone there), language links, theme menu */
.topbar__brand { font-weight: 700; }
@media (min-width: 1024px) { .topbar__brand { visibility: hidden; } }
.langs { display: inline-flex; gap: 2px; }
.langs__item { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 32px; padding: 0 var(--s-2); border-radius: var(--r-pill); color: var(--text-2); font-size: var(--fs-sm); font-weight: 700; text-decoration: none; }
.langs__item:hover { background: var(--surface-2); text-decoration: none; }
.langs__item[aria-current] { background: var(--brand-soft); color: var(--brand-text); }
@media (pointer: coarse) { .langs__item { min-width: var(--h-touch); min-height: var(--h-touch); } }
.side__foot .inline-form { flex: none; }
.bare__top { align-self: flex-end; display: flex; align-items: center; gap: var(--s-2); }
.auth__links { text-align: center; font-size: var(--fs-sm); }
.badge--pill .i { width: 1.1em; height: 1.1em; }

/* sheet editor */
.detail--sheet { grid-template-columns: minmax(0, 1fr) 22rem; }
@media (max-width: 1100px) { .detail--sheet { grid-template-columns: minmax(0, 1fr); } .detail--sheet .rail { position: static; } }
.table.edit td, .table.grid td, .table.grid th { padding-top: var(--s-2); padding-bottom: var(--s-2); height: auto; }
.table.edit .input { min-width: 0; }
.table.edit td.table__name { min-width: 11rem; }
.table.edit td:has(.weight) { min-width: 16rem; }
.table.grid tbody th, .rankt tbody th { background: none; color: var(--text); font-size: var(--fs-base); white-space: normal; height: auto; }
.table .cost { max-width: 10rem; }
.edit__del { width: 1%; }
.weight { display: flex; align-items: center; gap: var(--s-2); min-width: 0; }
.weight input.weight__num { width: 5.5rem; flex: none; padding: 0 var(--s-2); }
.weight__range { flex: 1 1 8rem; min-width: 6rem; height: 24px; margin: 0; accent-color: var(--brand); }
@media (pointer: coarse) { .weight__range { height: var(--h-touch); } }
.weights-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.weights-bar__sum { font-weight: 700; font-variant-numeric: tabular-nums; }
.weights-bar__sum.is-off { color: var(--warn-text); }
.table.grid select { min-width: 6.5rem; }
.scale { color: var(--text-muted); font-size: var(--fs-sm); }
.scale b { color: var(--text); }
@media (max-width: 640px) {
  /* stacked rows: every field takes the full width, its label in front (data-label) */
  .table.edit td, .table.grid td { width: 100%; font-size: var(--fs-sm); }
  .table.edit td.edit__del { width: auto; order: 2; flex: none; }
  .table.edit tr[data-variant] td.table__name, .table.edit tr[data-criterion] td.table__name { width: auto; flex: 1 1 0; min-width: 0; }
  .table.grid th.table__name { display: block; width: 100%; order: 1; font-size: var(--fs-base); padding: 0; background: none; }
  .table.grid td[data-label]::before { display: block; }
  .table.grid select, .table .cost { min-width: 0; max-width: none; width: 100%; }
  .weight { flex-wrap: wrap; }
}

/* result rail */
.issues__title { font-weight: 700; color: var(--warn-text); }
.issues__list { margin: var(--s-1) 0 0; padding-left: var(--s-5); color: var(--text-2); font-size: var(--fs-sm); display: flex; flex-direction: column; gap: var(--s-1); }
.issues:empty { display: none; }
#result-body { display: flex; flex-direction: column; gap: var(--s-3); }
.rankt td, .rankt th { height: auto; padding-top: var(--s-2); padding-bottom: var(--s-2); }
.rankt tr.is-top th, .rankt tr.is-top .rank { font-weight: 700; }
.rankt .is-out { color: var(--danger-text); }
.rankt .pts { min-width: 5rem; }
.rankt .meter { margin-top: var(--s-1); height: 6px; }
.verdict { font-weight: 600; }
@media (max-width: 640px) {
  .rankt thead { display: table-header-group; }
  .rankt, .rankt tbody { display: table; width: 100%; }
  .rankt tbody { display: table-row-group; }
  .rankt tr { display: table-row; }
  .rankt td, .rankt th { display: table-cell; font-size: var(--fs-sm); color: var(--text); }
}

/* sending */
.person { border: 0; padding: 0; margin: 0; min-width: 0; }
.person__legend { font-weight: 700; margin-bottom: var(--s-2); }
.person__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 10rem); gap: var(--s-3); }
.person__grid--two { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }   /* German only: no language field */
@media (max-width: 760px) { .person__grid { grid-template-columns: minmax(0, 1fr); } }
.choice { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.choice .check input { width: 20px; height: 20px; margin-top: 1px; }
.field--short { max-width: 12rem; }
.review__list { margin: 0; padding-left: var(--s-5); display: flex; flex-direction: column; gap: var(--s-1); overflow-wrap: anywhere; }
.row-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.table td.row-actions { height: auto; padding-top: var(--s-2); padding-bottom: var(--s-2); }
.devlink { display: inline-flex; align-items: center; gap: var(--s-2); padding: 2px var(--s-2); border-radius: var(--r-pill); background: var(--warn-soft); color: var(--warn-text); font-size: var(--fs-xs); font-weight: 700; }
.linkbox { margin: 0; padding: var(--s-3); border-radius: var(--r-md); background: var(--surface-2); overflow-wrap: anywhere; }
.linkbox__url { font-size: var(--fs-sm); }
.vote__when { display: block; color: var(--text-muted); }
.vote__comment { margin-top: var(--s-1); white-space: pre-line; overflow-wrap: anywhere; color: var(--text-2); }
.vote__revoke { margin-top: var(--s-2); }
.table td:has(.vote__comment) { height: auto; padding-top: var(--s-2); padding-bottom: var(--s-2); }
.pdf-links { display: inline-flex; gap: var(--s-1); flex-wrap: wrap; }
.alert .i { flex: none; margin-top: 2px; }
code { overflow-wrap: anywhere; }
