/* The game master's desks (/admin) and the case desk (/admin/cases).
   Desks are cards in a grid under their group's heading; a case is a row
   with its flags as small labelled chips, told apart by their edge and by
   their words, never by colour alone. Uses the tokens of site.css. */

/* The strip's label leads to all the desks: it keeps the label's look. */
.masthead__gm a.masthead__gm-label { color: var(--ochre); font-weight: 800; text-decoration: none; }
.masthead__gm a.masthead__gm-label:hover { color: var(--civic); }
.masthead__gm a.masthead__gm-label[aria-current='page'] { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--civic); }

/* --- The desks of the Commonwealth ------------------------------------------------------ */

.desks-waiting__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.desks-waiting__list strong { font-weight: 850; font-size: 1.15rem; margin-right: 0.2rem; }
.desks-build__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.desks-build__list .field__hint { margin: 0 0.4rem 0 0; }

.desk-group { margin: 2.5rem 0 0; }
.desk-group__title { display: flex; align-items: center; gap: 0.5rem; border-bottom: 3px solid var(--ink); padding-bottom: 0.35rem; }
.desk-group__lede { color: var(--ink-soft); max-width: var(--measure); }
.desk-list {
  list-style: none; margin: 1rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem;
}
.desk { border: 2px solid var(--ink); border-radius: var(--radius); padding: 0.85rem 1rem; background: var(--paper); }
.desk__link { display: flex; align-items: center; gap: 0.5rem; font-weight: 800; font-size: 1.1rem; color: var(--ink); }
.desk__link:hover { color: var(--civic); }
.desk__icon { color: var(--civic); flex: none; }
.desk__text { margin: 0.4rem 0 0; color: var(--ink-soft); font-size: 0.92rem; }

/* --- The case desk ---------------------------------------------------------------------- */

.desk-filter { margin-bottom: 0.5rem; }
.desk-filter select, .desk-filter input { width: 100%; max-width: 100%; }
.desk-filter__buttons { display: flex; align-items: center; gap: 1rem; margin: 0 0 1.25rem; }
.desk-count { color: var(--ink-soft); font-size: 0.92rem; }

.desk-cases, .desk-events { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--ink); }
.desk-case, .desk-event { border-bottom: 1px solid var(--rule); padding: 0.9rem 0; }
.desk-case--struck { border-left: 4px dashed var(--danger); padding-left: 0.75rem; }
.desk-case__number {
  margin: 0; font-size: 0.8rem; font-weight: 650; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.06em;
}
.desk-case__subject { display: block; font-size: 1.1rem; font-weight: 700; color: var(--ink); max-width: var(--measure); overflow-wrap: anywhere; }
.desk-case__subject:hover { color: var(--civic); }
.desk-case__meta { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0.35rem 0 0; color: var(--ink-soft); font-size: 0.92rem; }

.desk-flags { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.desk-flag {
  font-size: 0.8rem; font-weight: 700; padding: 0.1rem 0.5rem; border: 2px solid var(--rule); border-radius: var(--radius);
  color: var(--ink); background: var(--paper);
}
.desk-flag--approval { border-color: var(--ochre); border-left-width: 6px; }
.desk-flag--appeal, .desk-flag--hearing { border-color: var(--civic); }
.desk-flag--session { border-color: var(--ink); }
.desk-flag--failed, .desk-flag--struck { border-color: var(--danger); border-style: dashed; }
.desk-flag--closed, .desk-flag--reopened { border-color: var(--ink-soft); }

.desk-pages { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1rem; margin: 1.25rem 0 0; }
.desk-pages span { color: var(--ink-soft); }

.desk-turned { margin-top: 3rem; }
.desk-event__who { margin: 0.2rem 0; }
.desk-event__text { margin: 0.5rem 0; padding: 0.25rem 0 0.25rem 1rem; border-left: 4px solid var(--rule); max-width: var(--measure); overflow-wrap: anywhere; }
.desk-event__text p { margin: 0 0 0.4rem; }
.desk-event__why { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; margin: 0.25rem 0; }
.desk-bring { margin-top: 0.5rem; }
.desk-bring summary { cursor: pointer; font-weight: 700; color: var(--civic); }
.desk-bring input, .desk-bring textarea { width: 100%; }

/* --- One case --------------------------------------------------------------------------- */

.desk-record section { margin-top: 2rem; }
.desk-record .facts > div { min-width: 0; }
.desk-actions h3 { margin: 1.5rem 0 0.35rem; font-size: 1.05rem; }
.desk-actions h3:first-of-type { margin-top: 0.75rem; }
.desk-action textarea { width: 100%; }
.desk-decision { border-top: 1px solid var(--rule); padding-top: 0.5rem; margin-top: 1rem; }
.desk-decision h3 { margin: 0.25rem 0; font-size: 1rem; }
.desk-decision__meta { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0.25rem 0 0.5rem; color: var(--ink-soft); font-size: 0.92rem; }
.desk-params { display: grid; grid-template-columns: max-content 1fr; gap: 0.2rem 1rem; margin: 0.5rem 0; font-size: 0.92rem; }
.desk-params dt { font-weight: 700; color: var(--ink-soft); }
.desk-params dd { margin: 0; overflow-wrap: anywhere; }
.desk-sessions { padding-left: 1.25rem; }
.desk-log { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--ink); }
.desk-log li { display: grid; grid-template-columns: 9rem 1fr; gap: 0.25rem 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--rule); }
.desk-log__when { color: var(--ink-soft); font-size: 0.92rem; }
.desk-log__reason { display: block; color: var(--ink-soft); overflow-wrap: anywhere; }

@media (max-width: 36rem) {
  .desk-log li, .desk-params { grid-template-columns: 1fr; }
  .desk-list { grid-template-columns: 1fr; }
}
