/* 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 counted row of the 100% list has one control, the counter (ruling 14.7), and no tick column:
     name, with "Need 15 of 18" (and "Done" at the target) under it | minus, the number field, plus.
     Below 380px the name has the whole first line, so the field and the buttons never squeeze it. */
  .row.counted[data-check="counts"] { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 2px; align-items: center; padding: 6px 0; }
  .row.counted[data-check="counts"] > .nm { grid-column: 1 / -1; grid-row: 1; min-height: 44px; flex: none; }
  .row.counted[data-check="counts"] > .need, .row.counted[data-check="counts"] > .tag { grid-column: 1; grid-row: 2; font-size: 14px; white-space: normal; }
  .row.counted[data-check="counts"] > .need { display: flex; flex-wrap: wrap; align-items: center; row-gap: 4px; }
  .row.counted[data-check="counts"] .got { margin-left: 10px; }
  .row.counted[data-check="counts"] > .step { grid-column: 2; grid-row: 2; }
  .row.counted[data-check="counts"] .step input { width: 52px; }
  @media (min-width: 380px) {
    .row.counted[data-check="counts"] { row-gap: 0; }
    .row.counted[data-check="counts"] > .nm { grid-column: 1; align-items: flex-end; }
    .row.counted[data-check="counts"] > .need { align-self: start; padding-bottom: 2px; }
    .row.counted[data-check="counts"] > .step { grid-row: 1 / span 2; }
  }
  /* A row with a tick (a goal done once, or a fencing total the game does not count for you): tick | name, the
     target under the name. */
  .row:not(.counted)[data-check="counts"] { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 12px; align-items: center; }
  .row:not(.counted)[data-check="counts"] > .tick { grid-column: 1; grid-row: 1 / span 2; }
  .row:not(.counted)[data-check="counts"] > .nm { grid-column: 2; grid-row: 1; min-height: 44px; }
  .row:not(.counted)[data-check="counts"] > .tag { grid-column: 2; grid-row: 2; margin-top: -8px; padding-bottom: 6px; white-space: normal; }
  /* The line above the trophy list; gone once no row is hidden. */
  .tt-show { margin: 4px 0 0; }
  #list:not(:has(.row.hid)) .tt-show { display: none; }

  /* 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; }
}
