/* Tables of data, directory listings, spherical/Weyl/Coxeter archive pages */

.table-page { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
.table-page > * { min-width: 0; }

/* breadcrumb */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.2rem 0; list-style: none; margin: 0; padding: 0;
  font-size: var(--step--1); color: var(--muted); }
.crumbs li + li::before { content: "/"; padding-inline: 0.5rem; color: var(--rule); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }

/* page heading */
.page-head { display: grid; gap: 0.7rem; max-width: var(--measure); }
.page-head .lede { font-size: var(--step-1); line-height: 1.55; }
.page-head .lede-small { color: var(--muted); }
.page-head .path { font-size: var(--step--1); color: var(--muted); overflow-wrap: anywhere; }
.dir-title { font-family: var(--mono); font-size: var(--step-2); font-weight: 400; letter-spacing: 0; }

/* prose from the old pages, which may contain wide tables and pre blocks */
.data-prose { max-width: none; grid-template-columns: minmax(0, 1fr); }
.data-prose > * { min-width: 0; }
.data-prose > p, .data-prose > ul, .data-prose > ol, .data-prose > h2, .data-prose > h3,
.data-prose > h4, .data-prose > dl, .data-prose > blockquote, .data-prose > .note { max-width: var(--measure); }
.data-prose h2 { font-size: var(--step-1); margin-top: 1.25rem; }
.data-prose h3 { font-size: var(--step-0); font-family: var(--sans); font-weight: 600; margin-top: 0.75rem; }
.data-prose ul, .data-prose ol { margin: 0; padding-left: 1.4rem; display: grid; gap: 0.3rem; }
.data-prose hr { border: 0; border-top: 1px solid var(--rule); width: 100%; margin: 0.5rem 0; }
.data-prose code { overflow-wrap: anywhere; }

/* tables */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--surface);
}
.table-scroll:focus-visible { outline-offset: 2px; }
table.data {
  border-collapse: collapse;
  font-variant-numeric: tabular-nums lining-nums;
  font-size: var(--step--1);
  line-height: 1.45;
  min-width: 100%;
}
table.data td, table.data th {
  padding: 0.45rem 0.8rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}
table.data tr:last-child > td { border-bottom: 0; }
table.data caption {
  caption-side: top;
  text-align: left;
  padding: 0.55rem 0.8rem;
  font-family: var(--serif);
  font-size: var(--step-0);
  font-weight: 600;
  border-bottom: 1px solid var(--rule);
}
table.data th, table.data thead td {
  font-weight: 600;
  background: var(--paper);
}
table.data td + td, table.data th + th { border-left: 1px solid var(--rule); }
table.data .num { text-align: right; white-space: nowrap; }
table.inner { border-collapse: collapse; }
table.inner td { padding: 0 0.6rem 0.1rem 0; border: 0; }
table.inner td + td { border-left: 0; }

/* directory listings */
.table-scroll:has(> table.listing) { width: min(100%, 56rem); }
table.listing { width: 100%; }
table.listing td:first-child { font-family: var(--mono); font-size: 0.95em; }
table.listing td:nth-child(2) { white-space: nowrap; color: var(--muted); }
table.listing tr.dir td:first-child a { font-weight: 600; }
table.listing tr.up td { color: var(--muted); }
table.listing tr.up a { font-family: var(--sans); }

/* preformatted data and code */
pre.data {
  margin: 0;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 3px;
  font-size: 0.82rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  tab-size: 8;
}
.readme { display: grid; gap: 0.6rem; }
.readme h2 { font-family: var(--mono); font-size: var(--step-0); font-weight: 400; }

/* figure grids (orbit and cell graphs) */
.fig-group { display: grid; gap: 1rem; border-top: 1px solid var(--rule); padding-top: 1.25rem; margin-top: 1rem; }
.fig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.5rem; align-items: start; }
.fig-grid figure { margin: 0; display: grid; gap: 0.5rem; }
.fig-grid a { display: block; background: var(--figure-ground); border: 1px solid var(--rule); border-radius: 3px; padding: 0.5rem; }
.fig-grid img { display: block; margin-inline: auto; }
.fig-grid figcaption { font-size: var(--step--1); color: var(--muted); }

/* section index on /tables.html */
.table-index { list-style: none; margin: 0; padding: 0; display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.5rem; }
.table-index li { padding-block: 1rem; border-bottom: 1px solid var(--rule); display: grid; gap: 0.25rem; }
.table-index a { font-family: var(--serif); font-size: var(--step-1); font-weight: 500; text-decoration: none; }
.table-index p { color: var(--muted); font-size: var(--step--1); }
.table-index .meta { font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

/* e8plane */
.plane { margin: 0; display: grid; gap: 1rem; justify-items: center; }
.plane .disc {
  width: min(100%, 36rem);
  aspect-ratio: 1;
}
.plane .disc img { display: block; width: 100%; height: 100%; }
.plane figcaption { max-width: var(--measure); text-align: center; color: var(--muted); }

.updated { font-size: var(--step--1); color: var(--muted); border-top: 1px solid var(--rule); padding-top: 0.75rem; }

@media (max-width: 760px) {
  .table-index { grid-template-columns: minmax(0, 1fr); }
  table.data td, table.data th { padding: 0.4rem 0.6rem; }
}
.table-index p a { font-family: inherit; font-size: inherit; font-weight: inherit; text-decoration: underline; }
