:root {
  --sitemap-bg: #f4f6f8;
  --sitemap-surface: #ffffff;
  --sitemap-text: #1a1d21;
  --sitemap-link: #0b57d0;
  --sitemap-border: #d8dde6;
  --sitemap-muted: #5a6778;
  --sitemap-shadow: 0 8px 24px rgb(17 26 39 / 8%);
  --sitemap-radius: 12px;
  --sitemap-grid-min: 22rem;
}

* {
  box-sizing: border-box;
}

html {
  line-height: 1.4;
  scroll-behavior: smooth;
}

body {
  margin: clamp(1rem, 2vw, 2rem);
  font-family: "Trebuchet MS", "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% -10%, #ffffff 0, var(--sitemap-bg) 45%, #e8edf4 100%);
  color: var(--sitemap-text);
}

h1,
h2,
h3 {
  margin: 0 0 0.75rem;
  letter-spacing: 0.01em;
  line-height: 1.15;
  text-wrap: balance;
}

p {
  color: var(--sitemap-muted);
}

a {
  color: var(--sitemap-link);
  text-decoration: none;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
  transition: transform 180ms ease, color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

a:hover {
  color: color-mix(in oklab, var(--sitemap-link) 80%, black);
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--sitemap-link) 70%, white);
  outline-offset: 3px;
  border-radius: 6px;
}

ul,
ol {
  padding-left: 1.25rem;
}

.url-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: mega-link;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: stretch;
}

.url-list li {
  margin: 0;
  counter-increment: mega-link;
  display: inline-flex;
  align-items: stretch;
  flex: 0 1 auto;
  min-height: 3.1rem;
  max-width: 100%;
  border: 1px solid var(--sitemap-border);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border-radius: 8px;
  box-shadow: var(--sitemap-shadow);
  position: relative;
  overflow: hidden;
}

.url-list li::before {
  content: counter(mega-link, decimal-leading-zero);
  display: grid;
  place-items: center;
  padding: 0.75rem 0.5rem;
  border-right: 1px solid var(--sitemap-border);
  background: linear-gradient(180deg, #eef4ff, #e8f0ff);
  color: color-mix(in oklab, var(--sitemap-link) 55%, white);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

.url-list li > a {
  display: inline-flex;
  align-items: center;
  inline-size: fit-content;
  max-inline-size: min(100%, 78ch);
  min-height: 100%;
  padding: 0.75rem 0.9rem;
  overflow-wrap: anywhere;
}

.url-list li:hover {
  border-color: color-mix(in oklab, var(--sitemap-link) 35%, var(--sitemap-border));
}

.url-list li:hover > a {
  background: color-mix(in oklab, var(--sitemap-link) 9%, white);
  transform: translateX(2px);
}

/* For pages where links are direct children of body */
body > a[href] {
  display: inline-flex;
  align-items: center;
  max-inline-size: min(100%, 78ch);
  margin: 0.3rem 0.45rem 0.3rem 0;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--sitemap-border);
  border-radius: 8px;
  background: var(--sitemap-surface);
  box-shadow: 0 4px 12px rgb(17 26 39 / 6%);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  overflow-wrap: anywhere;
  vertical-align: top;
}

body > a[href]:hover {
  background: color-mix(in oklab, var(--sitemap-link) 8%, white);
  border-color: color-mix(in oklab, var(--sitemap-link) 30%, var(--sitemap-border));
  text-decoration: none;
}

code {
  font-family: "IBM Plex Mono", "Cascadia Mono", "Consolas", "Courier New", monospace;
  background: #e9eef7;
  border-radius: 4px;
  padding: 0.08rem 0.25rem;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

th,
td {
  border: 1px solid var(--sitemap-border);
  padding: 0.55rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: color-mix(in oklab, var(--sitemap-link) 10%, white);
}

.tabulary-grid {
  display: grid;
  grid-template-columns: minmax(14rem, 2.2fr) repeat(3, minmax(7rem, 1fr));
  border: 1px solid var(--sitemap-border);
  border-radius: var(--sitemap-radius);
  overflow: hidden;
}

.tabulary-grid > * {
  padding: 0.55rem 0.65rem;
  border-right: 1px solid var(--sitemap-border);
  border-bottom: 1px solid var(--sitemap-border);
  background: var(--sitemap-surface);
}

.tabulary-grid > .is-head {
  background: color-mix(in oklab, var(--sitemap-link) 10%, white);
  font-weight: 700;
}

.tabulary-grid > *:nth-child(4n) {
  border-right: 0;
}

@supports selector(:has(*)) {
  .url-list li:has(a:focus-visible),
  .url-list li:has(a:hover) {
    box-shadow: 0 10px 20px rgb(17 26 39 / 14%);
  }
}

@media (max-width: 860px) {
  .tabulary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tabulary-grid > *:nth-child(4n) {
    border-right: 1px solid var(--sitemap-border);
  }

  .tabulary-grid > *:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 720px) {
  body {
    margin: 1rem;
  }

  .url-list li > a {
    padding-right: 1rem;
  }
}
