/*
The site's own styles, on top of the vendored Bootstrap.
Plain CSS: no preprocessor, served exactly as written.
*/

main {
  margin: 4rem auto;
  max-width: 40rem;
  padding: 0 1.5rem;
}

/* A page that needs the room, like the spec dashboard, says `wide: true`. */
main.wide {
  max-width: 72rem;
}

/*
The spec dashboard's status colors: grey, red, yellow, orange, green, and
green striped for the partials that are as done as they will be. Bootstrap's
own palette variables, so dark mode follows.
*/
.status-green { background-color: var(--bs-success); }
.status-green-striped {
  background-color: var(--bs-success);
  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.3) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0.3) 75%, transparent 75%, transparent);
  background-size: 0.75rem 0.75rem;
}
.status-yellow { background-color: var(--bs-warning); }
.status-red { background-color: var(--bs-danger); }
.status-orange { background-color: var(--bs-orange); }
.status-grey { background-color: var(--bs-secondary); }

.status-bar { height: 0.75rem; }
.status-bar-large { height: 1.5rem; }
.status-bar-small { height: 0.5rem; }
.status-bar .progress-bar { width: 100%; }

.status-swatch {
  border-radius: 0.2rem;
  display: inline-block;
  height: 0.8rem;
  vertical-align: baseline;
  width: 0.8rem;
}

.status-legend .legend-swatch { width: 1.5rem; }
.status-legend .legend-count { font-variant-numeric: tabular-nums; font-weight: 600; }
.status-legend .legend-label { padding-right: 1.5rem; white-space: nowrap; }
.status-legend .legend-means { padding-right: 1.5rem; }
.status-legend tfoot td { border-bottom: 0; }

details.area { margin-top: 2.5rem; }
details.area > summary {
  cursor: pointer;
  margin-bottom: 0.5rem;
}
details.area > summary .area-name { margin-right: 0.5rem; }
details.area > summary .status-bar { margin-top: 0.5rem; }

details.directory { border-bottom: 1px solid var(--bs-border-color); }
details.directory summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 1rem;
  grid-template-columns: 17rem 3rem 1fr;
  padding: 0.4rem 0;
}

/* The `#` beside each name: quiet until hovered, and a linked spot lands
   clear of the window's edge, highlighted. */
.anchor {
  color: var(--bs-secondary-color);
  opacity: 0.4;
  text-decoration: none;
}
.anchor:hover, .anchor:focus { opacity: 1; }
details.area, details.directory, tr[id] { scroll-margin-top: 1rem; }
tr:target > td { background-color: var(--bs-warning-bg-subtle); }
/* The name, then its `#`: a long name ellipsizes and the `#` stays put. */
details.directory .directory-label {
  display: flex;
  gap: 0.3rem;
  min-width: 0;
}
details.directory .directory-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
details.directory .directory-count { text-align: right; }
details.directory table { margin: 0.25rem 0 1rem; }
.file-status { width: 1.5rem; }
.file-name { width: 14rem; }
.file-examples { text-align: right; width: 3rem; }
.file-detail .pdx { margin-right: 0.75rem; }
.file-detail .reason { color: var(--bs-secondary-color); font-size: 0.875rem; }
