/* GraphL catalog — the "Zed slate" theme (canonical tokens in the workspace CLAUDE.md), matched to
   the concept apps: the root catalog reuses each concept index's landing vocabulary (.idx*) so the
   two read as one system. Pure static: fonts are self-hosted woff2 (see /fonts). */

@font-face {
  font-family: 'IBM Plex Sans';
  font-weight: 400;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-weight: 600;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-600.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-weight: 700;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-700.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-weight: 400;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-weight: 500;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-500.woff2') format('woff2');
}

:root {
  --bg: #1a1d23; /* Zed-slate page ground (matches the concept apps' index) */
  --text: #eceef2;
  --accent: #5b8cff; /* platform blue — the root catalog's role accent (each concept index uses its
                        own brand color; blue marks the platform root) */
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Site header — traditional chrome: brand on the left, section nav on the right, full-bleed rule
   underneath. The inner row matches the catalog's own max-width so the brand lines up with the
   cards below it. */
.site {
  border-bottom: 1px solid var(--idx-line, rgba(255, 255, 255, 0.09));
  background: rgba(255, 255, 255, 0.014);
}
.site__inner {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.site__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.site__logo {
  display: block;
  border-radius: 6px;
}
.site__name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.site__nav {
  display: flex;
  gap: 4px;
}
.site__link {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #8b909c;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}
.site__link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}
.site__link[aria-current='page'] {
  color: var(--text);
  background: rgba(91, 140, 255, 0.14);
}
.site__link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* The catalog page — same shape as each concept app's landing (src/CourseIndex + .idx* in its
   index.css): a brand eyebrow over a big subject title, then a single column of cards. */
.idx {
  --idx-accent: var(--accent);
  --idx-muted: #8b909c;
  --idx-line: rgba(255, 255, 255, 0.09);
  min-height: 100vh;
  max-width: 940px;
  margin: 0 auto;
  padding: 40px 32px 64px;
}
/* Available to assistive tech, absent from the layout — the visible heading duty is done by the
   nav's current item, so a big repeated title would only cost space. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Concepts grid — a single column of cards (mirrors the concept index's course accordions, but each
   card is a plain link into that concept's own site rather than an expandable accordion). */
.idx__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.idx-card {
  border: 1px solid var(--idx-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.018);
  overflow: hidden;
}
/* The whole card is one link: number box · concept title · arrow (matches .idx-card__head's row). */
.idx-card__link {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.idx-card__link:hover {
  background: #22262e;
}
.idx-card__num {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--idx-accent);
  border: 1px solid var(--idx-accent);
  border-radius: 8px;
  padding: 5px 8px;
  line-height: 1;
}
.idx-card__title {
  min-width: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.idx-card__arrow {
  flex: none;
  font-size: 18px;
  line-height: 1;
  color: var(--idx-muted);
  transition: transform 0.15s ease, color 0.15s ease;
}
.idx-card__link:hover .idx-card__arrow {
  color: var(--idx-accent);
  transform: translateX(3px);
}

@media (max-width: 560px) {
  .site__inner {
    padding: 0 20px;
    height: 56px;
  }
  .site__link {
    padding: 8px 10px;
    font-size: 14px;
  }
  .idx {
    padding: 24px 20px 48px;
  }
}
