/* Riold site components. Built only from tokens in design-system.css. */

/* Accessibility */
.skip-link {
  position: absolute;
  top: 0;
  left: -100vw;
  z-index: 10;
  padding: 0.75rem 1rem;
  font-size: var(--label-strong);
  color: var(--paper);
  background: var(--ink);
}

.skip-link:focus {
  left: var(--gutter);
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 0.75rem;
}

.site-header .brand {
  min-height: 2.75rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: var(--label-strong);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--red);
}

.site-nav a[aria-current="page"] {
  border-bottom-color: var(--red);
}

/* Page blocks */
.hero {
  padding-block: calc(var(--section) * 1.75);
}

.hero .copy-lead,
.section-head .copy-lead {
  max-width: 46rem;
}

.section-head {
  max-width: 46rem;
  margin-bottom: 2rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.stack-card {
  display: flex;
  flex-direction: column;
}

.stack-card .copy-small {
  flex-grow: 1;
}

.footer-tagline {
  margin-top: 0.75rem;
}

.stack-card .text-link {
  align-self: flex-start;
  font-size: var(--label-strong);
  font-weight: 700;
}

/* App catalogue */
.app {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.5rem;
  align-items: start;
}

.app-icon {
  width: 5rem;
  height: 5rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * 4);
}

.app-title {
  font-size: var(--sub);
  margin-bottom: 0.5rem;
}

.app-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

@media (max-width: 30rem) {
  .app {
    grid-template-columns: 1fr;
  }
}

/* Legal and help pages */
.prose > * {
  max-width: 46rem;
}

.prose h2 {
  margin: 2.75rem 0 1rem;
  font-size: var(--sub);
}

.prose ul,
.prose ol {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.5rem;
  font-size: var(--copy);
  line-height: 1.65;
}

.prose a {
  color: var(--red);
}

.updated {
  color: var(--quiet);
  font-size: var(--label);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.table-wrap {
  margin: 0 0 1.5rem;
  overflow-x: auto;
}

.table-wrap table {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  font-size: var(--copy-small);
  line-height: 1.55;
}

.table-wrap th,
.table-wrap td {
  padding: 0.75rem 1rem 0.75rem 0;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--line);
}

.table-wrap th {
  color: var(--quiet);
  font-size: var(--label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.note {
  margin-top: 2.5rem;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: var(--wash-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.note p:last-child {
  margin-bottom: 0;
}

/* Not found */
.not-found {
  display: grid;
  align-content: center;
  min-height: 60dvh;
}

/* Footer */
.site-footer {
  padding-block: var(--section);
  background: var(--wash);
  border-top: 1px solid var(--line);
}

.site-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 2rem;
}

@media (min-width: 64rem) {
  .site-footer-grid {
    grid-template-columns: 1fr auto auto auto;
    column-gap: 4rem;
  }
}

.site-footer p {
  margin-bottom: 0;
}

.site-footer .copy-small {
  color: var(--muted);
}

.footer-links {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  font-size: var(--copy-small);
  color: var(--ink);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--red);
}

.footer-legal {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
