/* Hair Harvester — staff: verification, moderation, complaints, invitations. Loaded after the core stylesheet; scope every rule to this area's pages. */

/* The moderator's desk is a working tool: density and clarity first, ornament only where it leads to the next action.
   Every staff page is wrapped in .desk plus its own name (.queue, .review, .person, .invitations, .complaints);
   the public complaint form is section.narrow.complain. Nothing here is written against a bare shared class. */

/* ---------- the desk: what all staff pages share ---------- */
/* the desk is dense: its page title stands on the long-title rung and its sections on the panel rung */
.desk h1 { font-size: var(--t-long); margin-bottom: var(--s2); }
.desk h2 { font-size: var(--t-panel); margin: var(--s5) 0 var(--s3); }
.desk .kicker { margin: 0 0 6px; }
.desk .bench { display: grid; gap: var(--s5); }
.desk .bench > * { min-width: 0; }
.desk .bench h2:first-child { margin-top: 0; }
/* a link inside a row of small facts keeps the thumb's 44 px without growing the line */
.desk .meta a, .desk .about a, .desk .what a { padding-block: 13px; }
/* rows are tighter on the desk than in a visitor's list */
.desk .item { padding: 11px 0; }
.desk .item b { font-size: 1.1875rem; }
.desk .rows > p { margin: 0; padding: 12px 0; background: var(--run) top / auto 2px repeat-x, var(--run) bottom / auto 2px repeat-x; }

/* a mark that asks for attention: the word carries it, the rhombus only points */
.desk .flag {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px 2px; background: var(--cloth); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink); font: 700 .78125rem/1.3 var(--sans); letter-spacing: .05em; text-transform: uppercase;
  /* one line while it fits; with text set very large its two words wrap inside the row */
  max-width: 100%;
}
.desk .flag::before { content: ""; flex: none; width: 10px; height: 10px; background: var(--i-rhomb) center / 10px 10px no-repeat; }

/* somebody's own words, quoted: cloth with a red hem */
.desk .said { display: block; padding: 10px 14px; background: var(--cloth); box-shadow: inset 3px 0 0 var(--red); overflow-wrap: anywhere; }

/* ---------- the queue ---------- */
/* the two side doors of the desk; the dot between them stays in the markup for readers without styles */
.desk .desknav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 var(--s4); font-size: 0; }
.desk .desknav a {
  display: inline-flex; align-items: center; min-height: 46px; padding: 8px 14px; box-shadow: inset 0 0 0 1.5px var(--ink);
  text-decoration: none; font-size: 1.0625rem; line-height: 1.1; transition: background-color .15s;
}
.desk .desknav a:hover { background: var(--panel); color: var(--ink); }
.queue .lead-in { margin: 0 0 var(--s3); font-size: 1rem; line-height: 1.4; }
.queue .item .meta { gap: 6px 8px; }
.queue .item .meta > span:not(.flag) { margin-right: 4px; }

/* ---------- the review of one lot ---------- */
.review .about { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 var(--s4); }
.review .about .small { min-width: 0; overflow-wrap: anywhere; }
.review section > h2:first-child { margin-top: 0; }

/* the recording: the code first, so it is known before the first second plays */
.review .codebox { margin: 0 0 var(--s2); padding: 4px 10px 8px; }
/* the two groups of three digits stand on one line at any usual size; with text set very large on a narrow phone
   the second group goes under the first instead of off the screen */
.review .codebox .digits { font-size: 2.5rem; }
.review video.recording { max-height: 64vh; margin-bottom: var(--s2); }
.review .recmeta { margin: 0; line-height: 1.4; }
.review .recmeta .mark { color: var(--ink); font-weight: 700; }
.review .rec .note { margin: 0; }

/* the photographs whole, at their own proportions, large enough to hold beside the recording; a tap opens the file */
.review .shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: start; margin: 0 0 var(--s4); }
.review .shots a { display: block; background: var(--weave), var(--ground); background-size: 3px 3px, 3px 3px, auto; outline: 1px solid rgba(23, 18, 15, .22); outline-offset: -1px; }
.review .shots a:hover { outline: 2px solid var(--ink); outline-offset: -2px; }
.review .shots a:focus-visible { outline: 3px dashed var(--ink); outline-offset: 3px; }
.review .shots img { width: 100%; height: auto; max-height: 80vh; object-fit: contain; }
.review .prose { margin: 0 0 var(--s3); }
.review .ask { margin: 0 0 var(--s3); }
.review .facts { margin-bottom: var(--s4); }
.review .fact dd { font-size: 1.125rem; }
.review .conditions { padding: 4px var(--s4); margin-bottom: 0; }
.review .conditions th, .review .conditions td { padding-block: 8px; font-size: 1.0625rem; line-height: 1.3; }

/* what to look for in the recording: right under it on a phone (half the bench gap, so the two read as one block) */
.review .look { margin: calc(var(--s3) - var(--s5)) 0 0; }
.review .look > b { display: block; font: 700 1.25rem/1.2 var(--serif); }
.review .look .tips { margin-top: var(--s3); }
/* the verdict: what was decided before, and the decision itself in the stitched frame */
.review .journal { list-style: none; margin: 0 0 var(--s5); padding: 0; font-size: 1.0625rem; line-height: 1.4; }
.review .journal li { padding: 10px 0; background: var(--run) top / auto 2px repeat-x; }
.review .journal li:last-child { background: var(--run) top / auto 2px repeat-x, var(--run) bottom / auto 2px repeat-x; }
.review .journal .when { color: var(--ink-2); font-size: 1rem; font-variant-numeric: lining-nums tabular-nums; }
.review .journal .said { margin-top: 8px; }
.review .decision { margin: 0; padding: 8px 12px 14px; }
.review .decision h2 { margin: 0 0 var(--s1); }
.review .decision .field { margin: var(--s2) 0 0; }
/* approve and return stand as full blocks; the rejection sits apart under a bare seam, smaller, with its cross */
.review .acts { display: grid; gap: 10px; margin-top: var(--s3); }
/* inside the stitched frame of a 320 px phone a long word («доопрацювання») set twice as large is wider than the
   frame: there it breaks inside the button instead of pushing the button off the screen; at usual sizes it never does */
@media (max-width: 639.98px) {
  /* on a phone the two full-width buttons stand far enough apart that a thumb cannot take one for the other (F47) */
  .review .acts { grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
  .review .acts .btn { min-width: 0; overflow-wrap: anywhere; }
}
.review .apart { margin: var(--s4) 0 0; padding-top: var(--s3); background: var(--ghost) top / auto 2px repeat-x; }

/* photographs added during bidding (O4): one stitched frame, each photograph with its three answers under it */
.review .newphotos { margin: 0; padding: 8px 12px 14px; scroll-margin-top: var(--s4); }
.review .newphotos h2 { margin: 0 0 var(--s2); }
.review .newphotos > p { margin: 0 0 var(--s2); }
.review .newphotos .tips { margin: 0 0 var(--s4); }
.review .newshot { margin: 0 0 var(--s4); padding: 0; border: 0; min-width: 0; }
.review .newshot legend { padding: 0; margin: 0 0 var(--s2); font-weight: 700; }
.review .newshot .shots { grid-template-columns: minmax(0, 1fr); margin-bottom: var(--s2); }
.review .newshot .shots img { max-height: 60vh; }
.review .newphotos .field { margin: var(--s2) 0 var(--s3); }

/* ---------- a person's card ---------- */
.person .about { margin: 0 0 var(--s4); font-size: 1rem; line-height: 1.5; overflow-wrap: anywhere; }
.person .unblock { margin: 0 0 var(--s5); }
.person .blockbox { margin: 0 0 var(--s5); padding: 2px 0; background: var(--run) top / auto 2px repeat-x, var(--run) bottom / auto 2px repeat-x; }
.person .blockbox > summary { list-style: none; display: flex; align-items: center; gap: 12px; min-height: 52px; cursor: pointer; font-weight: 700; }
.person .blockbox > summary::before { content: ""; flex: none; width: 22px; height: 22px; background: var(--i-plus) center / 22px 22px no-repeat; transition: transform .15s; }
.person .blockbox[open] > summary::before { transform: rotate(45deg); }
.person .blockbox form { max-width: 38em; padding: 0 0 var(--s4); }
.person .blockbox form > p { margin: 0 0 var(--s3); }
.person .blockbox .field { margin-bottom: var(--s3); }
.person .item .muted.small { display: block; margin-top: 6px; overflow-wrap: anywhere; }

/* ---------- invitations ---------- */
.invitations .make { margin-bottom: 0; }
.invitations .make .field { margin-bottom: var(--s3); }
.invitations .invites > p { margin: 0; padding: 12px 0; background: var(--run) top / auto 2px repeat-x, var(--run) bottom / auto 2px repeat-x; }
/* one invitation: whose it is, the link, and the two things one can do with it */
.invitations .invite { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 12px 0 14px; background: var(--run) top / auto 2px repeat-x; }
.invitations .invite:last-child { background: var(--run) top / auto 2px repeat-x, var(--run) bottom / auto 2px repeat-x; }
.invitations .invite .who { grid-column: 1; min-width: 0; margin: 0; line-height: 1.3; overflow-wrap: anywhere; }
.invitations .invite .who b { font: 700 1.1875rem/1.2 var(--serif); margin-right: 6px; }
.invitations .invite input { grid-column: 1 / -1; min-height: 46px; padding: 8px 12px; font-size: 1rem; }
/* the script writes its short answer into the button ("Скопійовано"); when the browser refuses the clipboard, the long
   sentence goes into a note after the button (span.copynote) on a line of its own across the row, so the button and
   the link above or beside it never move */
.invitations .invite .btn { grid-column: 1 / -1; }
.invitations .invite form { grid-column: 2; grid-row: 1; margin: 0; }
.invitations .invite .link { margin-block: 0; }
.invitations .invite .copynote { grid-column: 1 / -1; }

/* ---------- complaints ---------- */
.complaints .case { margin-bottom: var(--s4); }
.complaints .case .what { margin: 0; }
.complaints .case .what b { font: 700 1.25rem/1.2 var(--serif); }
/* who complains about what: each reference is a field of its own, at least 44 px tall, so on a wrapped line
   the touch area of one link never lies over the next one */
.complaints .case .refs { display: flex; flex-wrap: wrap; column-gap: .3em; line-height: 20px; }
.complaints .case .refs > span { min-width: 0; padding-block: 12px; overflow-wrap: anywhere; }
.complaints .case .refs a { padding-block: 12px; }
.complaints .case .said { margin: 0 0 var(--s3); max-width: none; font-size: 1.125rem; line-height: 1.45; }
.complaints .case .hint { margin: 0 0 var(--s3); }
.complaints .case .field { margin-bottom: var(--s3); }
.complaints .case textarea { min-height: 76px; }
/* two verdicts of one weight; neither is the red block. Stacked on the narrowest phones, where the two words
   do not fit side by side inside the card */
.complaints .acts { display: grid; gap: 10px; }
.complaints .acts .btn { padding-inline: 10px; }
@media (min-width: 360px) {
  .complaints .acts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.complaints .open .empty { margin-top: 0; }
.complaints .closed .item b { display: inline; }
.complaints .closed .item .muted.small { display: block; margin-top: 6px; overflow-wrap: anywhere; }

/* ---------- the public complaint form ---------- */
/* the reasons are a list of whole rows; one of them is chosen, so the mark is a rhombus (a square with a check mark
   means "several of these" elsewhere on the site): a red outline that turns into a star, besides the black cloth of the row */
.complain .pills { flex-direction: column; align-items: stretch; gap: 6px; }
.complain .pills label { display: block; }
.complain .pills span { position: relative; display: flex; min-height: 48px; padding: 10px 14px 10px 50px; font-size: 1.0625rem; line-height: 1.25; }
.complain .pills span::before { content: ""; position: absolute; left: 12px; top: 50%; width: 26px; height: 26px; margin-top: -13px; background: var(--i-num) center / 26px 26px no-repeat; }
.complain .pills input:checked + span::before { width: 27px; height: 27px; margin-top: -15px; background: var(--i-star-cloth) center / 27px 27px no-repeat; }

/* ---------- 640 px: wide phone and tablet ---------- */
@media (min-width: 640px) {
  .review .shots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* the checklist beside the recording; the lot and the verdict take the whole width below */
  .review .bench { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .review .look { margin-top: 0; }
  .review .seen, .review .verdict, .review .newphotos { grid-column: 1 / -1; }
  .review .newshot .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review .acts { display: flex; flex-wrap: wrap; align-items: center; }
  .invitations .invite { grid-template-columns: minmax(0, 1fr) 232px; }
  .invitations .invite input { grid-column: 1; }
  .invitations .invite .btn { grid-column: 2; grid-row: 2; padding-inline: 12px; }
  .complaints .acts { display: flex; flex-wrap: wrap; }
  .complaints .acts .btn { padding-inline: 22px; }
}

/* ---------- 960 px: desktop ---------- */
@media (min-width: 960px) {
  .desk .bench { gap: var(--s6) var(--s7); align-items: start; }

  /* the recording on the left; the checklist, the lot and the verdict scroll past it on the right */
  .review .bench { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); }
  .review .rec { grid-column: 1; grid-row: 1 / span 3; }
  .review .look, .review .seen, .review .verdict, .review .newphotos { grid-column: 2; }
  /* no recording: every block keeps its place, so the page reads the same for a lot with a recording and without one;
     the left column only narrows, because it holds a notice instead of a player */
  .review .bench:not(:has(video.recording)) { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); }
  .review .conditions { padding: 6px var(--s5); }
  .review .decision, .review .newphotos { padding: 12px 20px 20px; }

  .person .bench { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .invitations .bench { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); }
  .invitations .make { position: sticky; top: 24px; }
  /* two columns only while there is an open complaint to work on; otherwise one reading column */
  .complaints .bench:has(> .open > .case):has(> .closed) { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .complaints .open, .complaints .closed { max-width: 820px; }
  /* with a pointer the references read as one wrapped sentence again; each keeps its own field, only lower */
  .complaints .case .what { margin-bottom: var(--s2); }
  .complaints .case .refs > span, .complaints .case .refs a { padding-block: 4px; }
}
/* the recording stays in sight only where the window is tall enough to hold it whole */
@media (min-width: 960px) and (min-height: 620px) {
  .review .rec { position: sticky; top: 16px; }
  .review video.recording { max-height: calc(100vh - 310px); }
}
