/* veritae.org course hub. Shared by /, /courses/<slug>/ and term pages built from the template. */
:root {
  --bg: #f6f6f4; --surface: #ffffff; --surface-2: #efefec; --text: #1c1c1e; --muted: #5d5d63;
  --line: #e2e2de; --accent: #2f4fb5; --accent-ink: #ffffff; --accent-soft: #e6ebfa;
  --ok: #0a7563; --ok-soft: #e3f2ee; --warn: #8a5a00; --warn-soft: #fbf0db;
  --radius: 14px; --shadow: 0 1px 2px rgb(0 0 0 / .04), 0 4px 16px rgb(0 0 0 / .05);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141416; --surface: #1d1d20; --surface-2: #26262a; --text: #ececee; --muted: #a0a0a8;
    --line: #2e2e33; --accent: #8ea6ff; --accent-ink: #0c1538; --accent-soft: #232b48;
    --ok: #34c3a6; --ok-soft: #163a33; --warn: #e3b25a; --warn-soft: #3a2e14;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 4px 16px rgb(0 0 0 / .25);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: var(--accent); }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }

header.top { border-bottom: 1px solid var(--line); background: var(--surface); }
header.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; min-height: 60px; padding-block: 8px; }
.brand { font-weight: 650; letter-spacing: -.01em; color: var(--text); text-decoration: none; }
.brand span { color: var(--muted); font-weight: 500; }
nav a { color: var(--muted); text-decoration: none; font-size: 15px; margin-left: 20px; }
nav a:hover, nav a[aria-current] { color: var(--text); }

.hero { padding: 48px 0 20px; }
.hero h1 { font-size: clamp(28px, 4.2vw, 40px); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 10px; }
.hero p { color: var(--muted); max-width: 64ch; margin: 0; font-size: 17px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 28px 0 14px; }
.section-head h2 { font-size: 20px; margin: 0; letter-spacing: -.01em; }
.term-picker { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
select {
  font: inherit; font-size: 15px; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px;
}

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 12px;
}
.card h3 { font-size: 19px; margin: 0; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .grow { flex: 1; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tag { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.tag.code { background: var(--accent-soft); color: var(--accent); }
.tag.current { background: var(--ok-soft); color: var(--ok); }
.tag.locked { background: var(--warn-soft); color: var(--warn); }
.meta { font-size: 13px; color: var(--muted); }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 15px; text-decoration: none;
}
.btn.secondary { background: var(--surface-2); color: var(--text); }
.btn:hover { filter: brightness(1.06); }
.btn:focus-visible, a:focus-visible, select:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.empty { color: var(--muted); padding: 24px; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; }

.list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.list li + li { border-top: 1px solid var(--line); }
.list a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; text-decoration: none; color: var(--text); }
.list a:hover { background: var(--surface-2); }
.list .meta { white-space: nowrap; }

.band { margin: 40px 0 56px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; }

footer { border-top: 1px solid var(--line); padding: 22px 0 36px; color: var(--muted); font-size: 13px; }
@media (max-width: 520px) { nav a { margin-left: 14px; } .hero { padding-top: 32px; } }
