/* DNA course — shared minimal styles for the landing page and lectures index. */

:root {
  --fg: #1a1a1a;
  --fg-muted: #555;
  --fg-faint: #888;
  --bg: #fafafa;
  --accent: #b22222;
  --rule: #e3e3e3;
  --max-width: 760px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Yu Gothic UI",
    Meiryo, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}

body {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
}

header.course-header {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

header.course-header h1 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: -0.01em;
}

header.course-header .subtitle-ja {
  display: block;
  margin-top: 0.4rem;
  font-size: 1rem;
  color: var(--fg-muted);
  font-weight: 400;
}

header.course-header .meta {
  margin-top: 1.2rem;
  font-size: 0.92rem;
  color: var(--fg-muted);
}

header.course-header .meta span + span::before {
  content: " · ";
  color: var(--fg-faint);
}

main section {
  margin-bottom: 2.5rem;
}

h2 {
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin: 2rem 0 0.75rem;
}

p { margin: 0 0 1rem; }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
a:hover { border-bottom-color: var(--accent); }

ul.lectures {
  list-style: none;
  padding: 0;
  margin: 0;
}

ul.lectures li {
  border-top: 1px solid var(--rule);
  padding: 1rem 0;
}
ul.lectures li:last-child { border-bottom: 1px solid var(--rule); }

ul.lectures .lecture-title {
  font-weight: 600;
  font-size: 1.05rem;
}

ul.lectures .lecture-meta {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.88rem;
  color: var(--fg-muted);
}

ul.lectures .lecture-status-stub {
  color: var(--fg-faint);
  font-style: italic;
}

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--fg-faint);
}

code, pre { font-family: var(--font-mono); font-size: 0.95em; }

/* Compass-driven content states */
.compass-placeholder {
  color: var(--fg-faint);
  font-style: italic;
}
html.compass-loaded .compass-placeholder {
  color: inherit;
  font-style: inherit;
}
.compass-error {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: #fff7f7;
  border: 1px solid #f0d4d4;
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--accent);
}
.compass-error small {
  display: block;
  margin-top: 0.3rem;
  color: var(--fg-faint);
  font-size: 0.8rem;
}

/* Roster (instructors & contributors) */
h3.people-role {
  margin: 1.2rem 0 0.25rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 600;
}
p.people-list {
  margin: 0 0 0.5rem;
  line-height: 1.7;
}

/* Bilingual content — show one language at a time, toggled at the <html> level */
html[lang="en"] [lang="ja"]:not(.lang-always),
html[lang="ja"] [lang="en"]:not(.lang-always) {
  display: none;
}

button.lang-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  padding: 0.35rem 0.7rem;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--fg-muted);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
button.lang-toggle:hover {
  color: var(--fg);
  border-color: var(--fg-muted);
}
button.lang-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
button.lang-toggle kbd {
  margin-left: 0.4rem;
  padding: 0 0.3rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--fg-faint);
}

@media (max-width: 520px) {
  body { padding: 2rem 1rem 3rem; font-size: 16px; }
  header.course-header h1 { font-size: 1.6rem; }
}
