/* 100% group (complete/index.html, complete/collectibles.html, complete/trophies.html): only what the blocks do not
   cover. Check rows, progress, steps, facts, find field and list rows come from 03-blocks.css. */
@layer pages {
  .cx-what { max-width: 70ch; margin: 20px 0 0; color: var(--tx2); font-size: 16px; line-height: 1.55; }

  /* A row of the 100% list: tick | name (the whole width), then "Need 15 of 18" | minus, the number field, plus.
     The name has a line of its own, so the field and the buttons never squeeze it on a narrow phone. */
  .row[data-check="counts"] { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; column-gap: 12px; row-gap: 2px; align-items: center; }
  .row[data-check="counts"] > .tick { grid-column: 1; grid-row: 1; }
  .row[data-check="counts"] > .nm { grid-column: 2 / -1; grid-row: 1; min-height: 44px; flex: none; }
  .row[data-check="counts"] > .need, .row[data-check="counts"] > .tag { grid-column: 2; grid-row: 2; font-size: 14px; white-space: normal; }
  .row[data-check="counts"] > .step { grid-column: 3; grid-row: 2; }
  .row[data-check="counts"] .step input { width: 52px; }
  /* From 380px there is room for one band: tick | name with "Need 15 of 18" under it | minus, number, plus. */
  @media (min-width: 380px) {
    .row[data-check="counts"] { row-gap: 0; }
    .row[data-check="counts"] > .tick { grid-row: 1 / span 2; }
    .row[data-check="counts"] > .nm { grid-column: 2; grid-row: 1 / span 2; align-self: stretch; align-items: flex-start; padding: 4px 0 24px; }
    .row[data-check="counts"]:not(:has(.need, .tag)) > .nm { align-items: center; padding: 0; }
    .row[data-check="counts"] > .need, .row[data-check="counts"] > .tag { align-self: end; padding-bottom: 2px; pointer-events: none; }
    .row[data-check="counts"] > .step { grid-row: 1 / span 2; }
  }

  /* A trophy row: tick | name and its requirement in one link | the trophy type at the top right. */
  .row[data-tt] { position: relative; align-items: flex-start; padding: 4px 0; }
  .row[data-tt] > a.nm { display: block; flex: 1 1 0; min-height: 44px; padding: 7px 0 3px; }
  .row[data-tt] > a.nm::before { content: ""; float: right; width: 64px; height: 22px; }
  .row[data-tt] .tt-req { display: inline-block; width: 100%; margin-top: 2px; color: var(--tx2); font-size: 14px; font-weight: 400; line-height: 1.36; }
  .row[data-tt] > .tag { position: absolute; top: 14px; right: 0; }
  [data-page="complete-trophies"] .tag { font-size: 14px; }
  [data-page="complete-trophies"] .chap { margin-top: 24px; }
  /* A hidden trophy: tick | "Hidden trophy" | Show on the first line, its tags on the line under the name. */
  [data-page="complete-trophies"] .hid { flex-wrap: wrap; row-gap: 0; min-height: 48px; padding: 2px 0 6px; }
  [data-page="complete-trophies"] .hid > .tag { margin-top: -6px; line-height: 1.3; }
  [data-page="complete-trophies"] .hid::after { content: ""; flex-basis: 100%; order: 2; }
  /* trophy types: two pairs a line */
  #types { max-width: 640px; margin-bottom: 16px; }
  #types tbody { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
  #types tr { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); }
  #types th, #types td { width: auto; border: 0; }
  [data-page="complete-trophies"] .hid .nm { flex: 1 1 0; }
  [data-page="complete-trophies"] .hid .tag { order: 3; }
  [data-page="complete-trophies"] .hid .nm + .tag { margin-left: 56px; }
  /* From 380px the tags fit on the name's line; a row with two tags moves Show to a line of its own, on the right. */
  @media (min-width: 380px) {
    [data-page="complete-trophies"] .hid { padding: 2px 0; }
    [data-page="complete-trophies"] .hid::after { content: none; }
    [data-page="complete-trophies"] .hid .nm { flex: 1 0 auto; }
    [data-page="complete-trophies"] .hid > .tag { order: 0; margin-top: 0; }
    [data-page="complete-trophies"] .hid .nm + .tag { margin-left: 0; }
    [data-page="complete-trophies"] .hid .show { margin-left: auto; }
  }

  #race-medals .cmp a { display: inline-flex; align-items: center; min-height: 44px; }
  #race-medals .cmp th, #race-medals .cmp td { padding-top: 0; padding-bottom: 0; vertical-align: middle; }
  .cx-what b { color: var(--tx); }
  .chap + .sec-more { margin-top: 10px; }
  [data-page^="complete"] .warn { margin-top: 18px; }
}
