/* SWE-sweep research pages: Tasks page only (loaded after paper.css and swv.css).
   Type (spec 1): apart from the frame and the intro, everything here is 13.6px serif (var(--type-foot)) or 12px
   mono. These rules override, for this page only, the shared swv.css sizes (12, 12.5, 13, 11.5px and 0.8em). */

/* ------------------------------------------------------------------ controls: search, Fix select, one row of filters */
html.paper .tasks-wrap .controls { grid-template-columns: minmax(0, 1fr); margin: 4px 0 6px; gap: 8px; }   /* the search box may shrink below its intrinsic width */
html.paper .controls .search-row { flex-wrap: nowrap; gap: 8px 16px; }
html.paper .controls .search-row input[type="search"] { flex: 1 1 auto; width: auto; font-size: var(--type-foot); padding: 5px 8px; }
html.paper .controls .search-row select { flex: none; font-size: var(--type-foot); padding: 5px 6px; }
/* one quiet line under the controls: the legend, and the count only while the list is narrowed */
html.paper .tasks-meta { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; margin: 4px 0 8px; }
html.paper .result-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 0; }
html.paper .result-line:empty { display: none; }
html.paper .result-line .r-miss { flex-basis: 100%; color: var(--ink); }
html.paper .result-line .clear { appearance: none; padding: 0; border: 0; background: none; color: var(--burgundy); font: inherit; cursor: pointer; }
html.paper .result-line .clear:hover { text-decoration: underline; text-underline-offset: 2px; }
html.paper details.filters-m > summary { cursor: pointer; color: var(--burgundy); font-size: var(--type-foot); padding: 2px 0; }
html.paper details.filters-m[open] > summary { margin-bottom: 6px; }
/* phones: the sort select in the Filters fold, since the table headers are hidden there */
html.paper .controls .sort-pick { display: flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--muted); font-size: var(--type-foot); }
html.paper .controls .sort-pick select { font-size: var(--type-foot); padding: 5px 6px; }

/* ------------------------------------------------------------------ legend over the table (heading, then one line of keys) */
html.paper .copy ul.tasks-legend { margin: 0; gap: 4px 14px; }
html.paper .tasks-legend .lg-h { color: var(--muted); font-variant-caps: all-small-caps; letter-spacing: 0.06em; text-transform: lowercase; }
html.paper .tasks-legend .lg-na { display: inline-block; width: 18px; text-align: center; }

/* ------------------------------------------------------------------ type on this page: 13.6px serif, 12px mono */
html.paper .tasks-wrap .mono, html.paper .tasks-wrap .tid, html.paper .tasks-wrap code { font-size: 12px; }
html.paper .tasks-table td.t-name { font-size: 12px; }
html.paper .tasks-wrap .akg, html.paper .tasks-wrap .akg .aud { font-size: var(--type-foot); }
/* "as released → with our fixes": one strikethrough style (muted value, Burgundy line) */
html.paper .tasks-wrap s { color: var(--muted); text-decoration-color: var(--burgundy); text-decoration-thickness: 1.5px; }

/* ------------------------------------------------------------------ the table */
html.paper .tasks-table thead th { white-space: nowrap; }
html.paper .tasks-table thead th button { appearance: none; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
html.paper .tasks-table thead th button:hover { color: var(--burgundy); }
html.paper .tasks-table thead th[aria-sort] button { color: var(--burgundy); }
html.paper .tasks-table .sort-ind { display: inline-block; min-width: 0.7em; font-weight: 400; }
/* numeric headers end flush with their figures; the sort arrow goes on the left */
html.paper .tasks-table th.num button { display: inline-flex; flex-direction: row-reverse; align-items: baseline; gap: 0.25em; }
/* keep 'Regression tests' and 'Golden solution' apart once the numeric header is flush */
html.paper .tasks-table > thead > tr > th[data-sort="change"], html.paper .tasks-table > tbody > tr.trow > td.t-ak { padding-left: 16px; }
html.paper .tasks-table > tbody > tr > td { vertical-align: middle; }
html.paper .tasks-table > tbody > tr > td.num { white-space: nowrap; }
html.paper .tasks-table > tbody > tr.trow > td { height: 29px; }
html.paper .tasks-table > tbody > tr > td.t-name { white-space: nowrap; }
html.paper .tasks-table td.t-by { min-width: 6em; white-space: nowrap; }
html.paper .tasks-table > thead > tr > th, html.paper .tasks-table > tbody > tr.trow > td { padding-left: 5px; padding-right: 5px; }
html.paper .tasks-table > thead > tr > th:first-child, html.paper .tasks-table > tbody > tr.trow > td:first-child { padding-left: 4px; }
html.paper .tasks-table tbody tr.trow { scroll-margin-top: 72px; }
/* keyboard focus: the row charts' inset bar on the first cell, not a box round the row */
html.paper .tasks-table tbody tr.trow:focus-visible { outline: none; }
html.paper .tasks-table tbody tr.trow:focus-visible > td:first-child { box-shadow: inset 2px 0 0 var(--burgundy); }
html.paper .tasks-table tbody tr.trow[aria-expanded="true"] > td { border-top: 0.6px solid var(--line); }
html.paper .tasks-table tr.empty td { padding: 14px 4px; color: var(--muted); }
html.paper .tasks-table tr.detail > td { padding: 4px 12px 24px; background: var(--paper); }
html.paper .tasks-wrap .table-note { max-width: var(--text-width); }
/* the table note: one line, with the details folded (as Figure 7's notes on the Overview) */
html.paper .tasks-wrap details.tn-notes { display: inline; }
html.paper .tasks-wrap details.tn-notes > summary { display: inline; cursor: pointer; color: var(--burgundy); white-space: nowrap; }
html.paper .tasks-wrap details.tn-notes > summary::-webkit-details-marker { display: none; }
html.paper .tasks-wrap details.tn-notes > summary::after { content: " ▸"; }
html.paper .tasks-wrap details.tn-notes[open] > summary::after { content: " ▾"; }
html.paper .tasks-wrap details.tn-notes > ul { margin: 6px 0 0; padding-left: 1.1em; }
html.paper .tasks-wrap details.tn-notes > ul > li { margin: 0 0 3px; line-height: 1.4; text-align: left; hyphens: manual; }

/* ------------------------------------------------------------------ detail (table row and card): hairlines, no boxes */
html.paper .detail { text-align: left; }
html.paper .detail > p, html.paper .detail > ul, html.paper .detail > dl { max-width: 640px; }
html.paper .detail p { margin: 4px 0; font-size: var(--type-foot); line-height: 1.4; }
html.paper .detail ul { margin: 4px 0; padding-left: 1.2em; }
html.paper .detail ul > li { margin: 0 0 4px; font-size: var(--type-foot); line-height: 1.4; text-align: left; hyphens: manual; overflow-wrap: anywhere; }
html.paper .detail .facts-line { margin: 6px 0 10px; color: var(--muted); overflow-wrap: anywhere; }
html.paper .detail h4 { margin: 20px 0 4px; }
html.paper .detail dl.t-facts { display: grid; grid-template-columns: 9em minmax(0, 1fr); gap: 2px 12px; margin: 0; font-size: var(--type-foot); line-height: 1.4; }
html.paper .detail dl.t-facts dt { color: var(--muted); }
html.paper .detail dl.t-facts dd { margin: 0; min-width: 0; font-variant-numeric: lining-nums tabular-nums; }
html.paper .detail ul.fact-lines { list-style: none; margin: 8px 0 0; padding: 0; }
html.paper .detail ul.fact-lines > li { margin: 0 0 2px; padding-left: 0; }

/* gradings: booktabs; a run of gradings from one fix names it once, with a hairline only between fixes */
html.paper .detail .gradings { width: 100%; margin-top: 0; }
html.paper .detail .gradings .vc { grid-template-columns: 40px minmax(0, 1fr); gap: 6px; }
html.paper .detail .gradings th, html.paper .detail .gradings td { font-size: var(--type-foot); vertical-align: top; }
html.paper .detail .gradings thead th { white-space: nowrap; font-weight: 700; vertical-align: baseline; }
html.paper .detail .gradings > tbody > tr > * { height: auto; padding-top: 3px; padding-bottom: 3px; border-top: 0; }
html.paper .detail .gradings > tbody > tr:first-child > * { padding-top: 6px; }
html.paper .detail .gradings > tbody > tr:not(:first-child):not(.g-cont):not(.vnote-row) > * { border-top: 0.6px solid var(--line); padding-top: 6px; }
html.paper .detail .gradings tr.g-cont > td.g-chg { visibility: hidden; }
html.paper .detail .gradings .g-chg { white-space: nowrap; min-width: 5em; }
html.paper .detail .gradings .g-sub { font-weight: 400; min-width: 7em; }
html.paper .detail .gradings td[data-k="As released"], html.paper .detail .gradings td[data-k="With the fix"] { min-width: 11.5em; }
html.paper .detail .gradings .g-src { color: var(--muted); min-width: 8em; }
html.paper .detail .gradings .g-aud { white-space: normal; }
html.paper .detail .gradings tr.vnote-row td.vnote { padding-left: 4px; padding-bottom: 6px; overflow-wrap: anywhere; }
html.paper .detail .gradings .vnote .vn { display: block; }
html.paper .detail .gradings .vnote .vn + .vn { margin-top: 2px; }
html.paper .detail .table-note { margin-top: 6px; }

/* changes: the fix in a narrow left column, the text on the right */
html.paper .detail ul.changes { list-style: none; margin: 0; padding: 0; }
html.paper .detail ul.changes > li { display: grid; grid-template-columns: 5em minmax(0, 1fr); column-gap: 12px; margin: 0; padding: 5px 0; }
html.paper .detail ul.changes > li, html.paper .detail ul.changes .ch-b p { text-align: left; }
html.paper .detail ul.changes .ch-fix { margin: 0; }
html.paper .detail ul.changes .ch-via { color: var(--muted); }
html.paper .detail ul.changes .ch-b > p:first-child { margin-top: 0; }
html.paper .detail .ids { color: var(--ink); overflow-wrap: anywhere; }
html.paper .detail .audit-key { color: var(--muted); }

/* ------------------------------------------------------------------ narrow desktop / tablet (the table still shows) */
@media (max-width: 900px) {
  html.paper .tasks-table .hide-m { display: none; }
}
@media (max-width: 760px) {
  html.paper .tasks-table > tbody > tr > td.t-name { white-space: nowrap; overflow-wrap: normal; }   /* V13: no "distributions / -jl" */
  html.paper .detail .gradings .g-chg { white-space: normal; }
  html.paper .detail .gradings .g-sub, html.paper .detail .gradings .g-src,
  html.paper .detail .gradings td[data-k="As released"], html.paper .detail .gradings td[data-k="With the fix"] { min-width: 0; }
  html.paper .tasks-table tr.detail > td { padding-left: 4px; padding-right: 4px; }
}
@media (max-width: 680px) {
  /* paper.css fixes table layout and a 40% first column below 680px; the tasks table needs auto layout. */
  html.paper .tasks-table { table-layout: auto; }
  html.paper .tasks-table th:first-child { width: auto; }
  html.paper .tasks-table > tbody > tr > td.num { white-space: normal; }
  html.paper .detail .gradings { table-layout: auto; }
  html.paper .detail .gradings th:first-child { width: auto; }
}

/* ------------------------------------------------------------------ phone: cards */
@media (max-width: 560px) {
  html.paper .controls .desk-only { display: none; }
  /* 16px keeps iOS from zooming the page when the search box takes focus */
  html.paper .controls .search-row input[type="search"] { font-size: 16px; min-width: 0; }

  html.paper .copy ul.card-list > li { padding: 0; display: block; }
  html.paper .card-list .card-h { display: grid; gap: 3px; padding: 9px 2px; cursor: pointer; scroll-margin-top: 48px; }
  html.paper .card-list .card-h:hover, html.paper .card-list .card-h[aria-expanded="true"] { background: var(--b-wash); }
  html.paper .card-list .card-h:focus-visible { outline: none; box-shadow: inset 2px 0 0 var(--burgundy); }
  html.paper .card-list .c1 { align-items: baseline; }
  html.paper .card-list .c1 .tid { font-size: 12px; overflow-wrap: anywhere; min-width: 0; }
  html.paper .card-list .c2 { align-items: center; }
  html.paper .card-list .c3 { font-size: var(--type-foot); color: var(--muted); }
  html.paper .card-list li.empty { padding: 12px 2px; color: var(--muted); font-size: var(--type-foot); }
  html.paper .card-list .detail { padding: 2px 2px 18px; }

  html.paper .detail dl.t-facts { grid-template-columns: 8em minmax(0, 1fr); }
  /* the gradings table reflows into blocks (swv.css); put the fix and the submission on one line */
  html.paper .detail .gradings tr > td.g-chg, html.paper .detail .gradings tr > th.g-sub { display: inline-block; padding-right: 6px; vertical-align: baseline; min-width: 0; }
  html.paper .detail .gradings tr.g-cont > td.g-chg { visibility: visible; }
  html.paper .detail .gradings td[data-k="As released"], html.paper .detail .gradings td[data-k="With the fix"] { min-width: 0; }
  html.paper .detail .gradings > tbody > tr:not(:first-child):not(.g-cont):not(.vnote-row) > * { border-top: 0; }
  html.paper .detail .gradings td[data-k] { grid-template-columns: 8em minmax(0, 1fr); }
  html.paper .detail .gradings td[data-k]::before { font-size: var(--type-foot); }
  html.paper .detail ul.changes > li { grid-template-columns: minmax(0, 1fr); row-gap: 2px; }
}

@media print {
  html.paper .tasks-legend, html.paper .result-line .clear { display: none; }
}

/* V17: the no-grading dash sits in the same 44px slot as the "no released grading" dash */
html.paper .tasks-table .akg > .na:only-child, html.paper .card-list .akg > .na:only-child { display: inline-block; width: 44px; text-align: center; }
/* V18: the closing link does not run into the table note */
html.paper .tasks-wrap + .closing { margin-top: 36px; }

