/* Global table and list styling.
 *
 * Page-level <style> blocks in Astro are scoped: a bare `table{}` in a page
 * compiles to `table[data-astro-cid-xxxx]`, which only matches elements in that
 * page's own markup. Listing pages, the daily challenge and the dream cup all
 * render tables and lists that no page-level block claimed, so they reached the
 * browser unstyled. This file is loaded on every page and styles those elements
 * once, by tag, with no scope attribute to satisfy.
 *
 * The palette matches src/layouts/Site.astro.
 */

main table {
  border-collapse: collapse;
  width: 100%;
  background: #fff;
  margin: 1.25rem 0;
  font-size: 0.95rem;
}

main caption {
  text-align: left;
  font-weight: 700;
  padding: 0.5rem 0;
  color: #183528;
}

main thead,
main tfoot {
  background: #e1ebe1;
}

main th,
main td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid #d9e1d8;
  text-align: left;
  vertical-align: top;
}

main tbody tr:hover {
  background: #f2f6f0;
}

/* A wide stat table must scroll rather than force the whole page sideways. */
main table {
  display: block;
  overflow-x: auto;
  white-space: nowrap;
}

@media (min-width: 60rem) {
  main table {
    display: table;
    white-space: normal;
  }
}

main ul,
main ol {
  padding-left: 1.4rem;
  line-height: 1.7;
}

main li {
  margin: 0.2rem 0;
}

main section {
  margin: 2.5rem 0;
}

main aside {
  background: #fff0c8;
  padding: 1rem;
  border-left: 4px solid #9b6c00;
  margin: 1.5rem 0;
}

main details {
  margin: 1rem 0;
}

main summary {
  cursor: pointer;
  font-weight: 600;
}

main h2 {
  margin-top: 2rem;
}

main img {
  max-width: 100%;
  height: auto;
}

[hidden] {
  display: none !important;
}
