/* 0.7.0 - the SOP approvals page (SPEC 1712). Reuses imp.css (btn, pill, card, list, filters, sotabs .seg). */
.s2head .refreshbar { flex-wrap: wrap; }
.s2head .btn.s2new { padding: 8px 18px; font-weight: 600; }
.s2filters { flex-wrap: wrap; }
.s2filters input[type=search] { width: auto; min-width: 220px; height: 36px; padding: 4px 10px; font-size: 14px; border: 1px solid var(--line-strong, #c9cfd8); border-radius: 6px; }
.s2filters input[type=date] { width: auto; height: 36px; padding: 4px 8px; font-size: 14px; }
.s2wrap { width: 100%; }
table.s2list th { padding: 0; }
table.s2list th .s2sort { all: unset; display: block; padding: 9px 12px; cursor: pointer; font-weight: 600; font-size: 13px; }
table.s2list th .s2sort:focus-visible { outline: 2px solid var(--focus, #1f4e8c); outline-offset: -2px; }
table.s2list td.c-name .goal { font-weight: 600; }
table.s2list .s2purpose { max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.s2list .s2turn { margin-top: 4px; }
table.s2list tr.s2you td:first-child { box-shadow: inset 3px 0 0 var(--s-amber, #7a4a0c); }
table.s2list td.c-fn, table.s2list td.c-version { white-space: nowrap; }
table.s2list td.c-act { text-align: right; white-space: nowrap; }
.s2more { display: inline-block; margin: 10px 0 0; font-weight: 600; }
h2.group { margin-top: 22px; }

/* the form */
.modal .box.s2form { width: min(860px, 96vw); }
.s2grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
.s2grid .s2wide { grid-column: 1 / -1; }
.s2grid .field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 3px; font-weight: 600; }
.s2grid .field { margin: 8px 0; display: block; }
.s2hint { min-height: 18px; margin-top: 3px; }
.s2hint.ok { color: var(--s-green, #1b5e3a); } .s2hint.bad { color: var(--s-red, #9b2419); }
.s2appr { display: grid; gap: 6px; }
.s2arow { display: flex; gap: 6px; align-items: center; }
.s2arow select { flex: 1; min-width: 0; }
.s2arow .s2n { width: 22px; text-align: center; font-weight: 700; color: var(--muted); }
.s2appr > .btn { justify-self: start; }
.s2file { display: grid; gap: 6px; }
.s2file input[type=file] { font-size: 14px; }

/* the SOP page */
.s2meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 4px 0 8px; }
ol.s2line { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
ol.s2line li.s2st { flex: 1 1 150px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--surface, #fff); margin: 0; }
ol.s2line li.done { border-color: var(--s-green, #1b5e3a); }
ol.s2line li.done b { color: var(--s-green, #1b5e3a); }
ol.s2line li.now { border: 2px solid var(--s-blue, #274c8a); background: var(--s-blue-bg, #eaf0f8); }
ol.s2line li.back { border: 2px solid var(--s-red, #9b2419); background: var(--s-red-bg, #faeceb); }
ol.s2line li.next, ol.s2line li.off { color: var(--muted); }
ol.s2line li.off { opacity: .6; }
dl.s2kv { display: grid; grid-template-columns: 210px 1fr; gap: 6px 14px; margin: 0; }
dl.s2kv dt { color: var(--muted); font-weight: 600; font-size: 13px; }
dl.s2kv dd { margin: 0; white-space: pre-line; }
ul.s2comments { list-style: none; margin: 0; padding: 0; }
ul.s2comments li { padding: 8px 0; border-bottom: 1px solid var(--line); margin: 0; }
ul.s2comments li:last-child { border-bottom: 0; }

@media (max-width: 700px) {
  .s2head .refreshbar { justify-content: flex-start; }
  .s2filters { display: grid; grid-template-columns: 1fr; }
  .s2filters input[type=search] { width: 100%; min-width: 0; }
  .s2filters .fmenu select { max-width: none; width: 100%; }
  table.s2list td[data-l]:not([data-l=""]):not(.c-name)::before { content: attr(data-l) ": "; color: var(--muted); font-size: 12px; }
  table.s2list td.c-act { text-align: left; }
  table.s2list .s2purpose { white-space: normal; }
  .s2grid { grid-template-columns: 1fr; }
  dl.s2kv { grid-template-columns: 1fr; gap: 2px; }
  dl.s2kv dd { margin-bottom: 8px; }
  ol.s2line { flex-direction: column; }
  ol.s2line li.s2st { flex: none; }
}
@media (min-width: 701px) {
  table.s2list td.c-name, table.s2list th.c-name { width: 24%; }
  table.s2list td.c-status, table.s2list th.c-status { width: 15%; }
  table.s2list td.c-since, table.s2list th.c-since { width: 12%; }
}

/* 0.7.2 - the approvers read only from the draft's header; the Source (.md); the form check by file */
.s2ro { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: var(--s-blue-bg, #eaf0f8); }
.s2ro ol.s2alist { margin: 0 0 4px; padding-left: 22px; }
.s2ro ol.s2alist li { margin: 2px 0; font-weight: 600; }
.s2ro .line { margin-top: 0; }
.s2file input[type=text] { width: 100%; min-width: 0; box-sizing: border-box; }
.line.s2req { background: var(--s-blue-bg, #eaf0f8); color: var(--s-blue, #274c8a); flex-wrap: wrap; overflow-wrap: anywhere; }
.line.s2back, .line.red { overflow-wrap: anywhere; }
table.s2files td { overflow-wrap: anywhere; }
@media (max-width: 700px) {
  table.s2files, table.s2files tbody, table.s2files tr, table.s2files td { display: block; width: auto; }
  table.s2files tr:first-child { display: none; }
  table.s2files tr { border-bottom: 1px solid var(--line); padding: 6px 0; }
}
