:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --text: #1f2933;
  --muted: #52606d;
  --border: #d9e2ec;
  --accent: #0b5fff;
  --accent-hover: #0847bf;
  --header-start: #0f172a;
  --header-end: #1e293b;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 14px;
  --max-width: 960px;
  --focus-ring: 0 0 0 3px rgba(11, 95, 255, 0.24);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-y: scroll;
}

main {
  padding-bottom: 2rem;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
}

ul.document-list,
ul.document-list li {
  list-style: none;
  margin: 0;
  padding: 0;
}

ul.document-list {
  padding-left: 0;
  margin: 1rem 0 0;
}

ul.document-list li {
  padding: 0.9rem 0;
  border-top: 1px solid var(--border);
}

ul.document-list li:first-child {
  border-top: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 6px;
}

.stealth-link {
  color: inherit;
  text-decoration: none;
}

.stealth-link:hover {
  color: inherit;
  text-decoration: none;
}

.site-header {
  background: linear-gradient(135deg, var(--header-start), var(--header-end));
  color: #ffffff;
  padding: 3rem 0 2.5rem;
  margin-bottom: 2rem;
}

.site-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
}

.site-subtitle {
  margin: 0.6rem 0 0;
  max-width: 60ch;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.02rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-top: 0.9rem;
  font-size: 0.95rem;
}

.site-nav a,
.site-nav .current {
  display: inline-block;
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
}

.site-nav a:hover {
  background: var(--accent-hover);
  color: #ffffff;
  text-decoration: none;
}

.site-nav .current {
  background: #ffffff;
  color: var(--header-start);
  font-weight: 700;
}

.site-nav a:focus-visible,
.site-nav .current:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.nav-sep {
  display: none;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-text {
  margin: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.card h2 {
  margin: 0 0 0.4rem;
  font-size: 1.5rem;
  line-height: 1.2;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.section-icon {
  display: inline-block;
}

.section-text {
  margin: 0;
  color: var(--muted);
}

.count-badge {
  display: inline-block;
  white-space: nowrap;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f8fafc;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.document-item {
  padding-block: 1rem;
}

.doc-title {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.35;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem;
}

.doc-title-link {
  font-weight: 700;
}

.doc-meta {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.doc-abstract {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.doc-fileline {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.88rem;
  word-break: break-word;
}

.doc-filename {
  font-family: "Cascadia Mono", "Consolas", "Courier New", monospace;
}

.latest-list a {
  font-weight: 600;
}

.latest-meta {
  color: var(--muted);
}

.last-updated {
  margin: 0.9rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.empty {
  color: var(--muted);
  font-style: italic;
}

.browse-link {
  margin-top: 1rem;
  margin-bottom: 0;
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .section-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .count-badge {
    margin-top: 0.2rem;
  }

  .card {
    padding: 1.2rem;
  }

  .site-header {
    padding: 2.25rem 0 2rem;
  }
}

.file-badge {
  display: inline-block;
  margin-left: 0.55rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #b91c1c;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  vertical-align: middle;
}
