/* Linux Foundations — course materials
   Visual direction: the manual page. Fixed measure, monospace furniture,
   ruled header and footer bars carrying a section tag, ink on cool paper. */

:root {
  --paper:      #edeff2;
  --surface:    #f8f9fb;
  --ink:        #17202b;
  --ink-soft:   #55606e;
  --ink-faint:  #8b95a2;
  --rule:       #c9d0d9;
  --accent:     #1f6b63;
  --accent-dim: #e2ecea;
  --notice:     #6b3a5b;
  --notice-dim: #f0e7ee;
  --measure:    68ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #141a21;
    --surface:    #1b232c;
    --ink:        #dfe5ec;
    --ink-soft:   #9aa5b2;
    --ink-faint:  #6b7684;
    --rule:       #2e3945;
    --accent:     #6fbdb2;
    --accent-dim: #1c2f2d;
    --notice:     #c894b6;
    --notice-dim: #2a1f27;
  }
}

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

body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

/* --- man-page furniture ------------------------------------------------ */

.manhead {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

header.manhead { border-bottom: 1px solid var(--rule); }
footer.manhead { border-top: 1px solid var(--rule); margin-top: 4rem; margin-bottom: 2rem; }

.manhead-mid { color: var(--ink-soft); }
.manhead a { color: var(--ink-soft); }

/* --- layout ------------------------------------------------------------ */

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3rem 1.5rem 0;
}

.eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.6rem;
}

/* --- type -------------------------------------------------------------- */

h1, h2, h3 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  line-height: 1.18;
  color: var(--ink);
}

h1 {
  font-size: clamp(2rem, 5vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
  text-wrap: balance;
}

h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 3rem 0 0.9rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
}

h3 {
  font-size: 1.08rem;
  font-weight: 500;
  margin: 2rem 0 0.6rem;
  color: var(--accent);
}

p { margin: 0 0 1.1rem; }

strong { font-weight: 600; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- lists ------------------------------------------------------------- */

ul, ol { padding-left: 1.3rem; margin: 0 0 1.1rem; }
li { margin-bottom: 0.45rem; }
li::marker { color: var(--ink-faint); }

/* --- code -------------------------------------------------------------- */

code {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.87em;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.08em 0.34em;
}

pre {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 3px;
  padding: 1rem 1.15rem;
  overflow-x: auto;
  margin: 0 0 1.3rem;
  font-size: 0.86rem;
  line-height: 1.55;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}

/* --- tables ------------------------------------------------------------ */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.4rem;
  font-size: 0.92rem;
}

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

th {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.71rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--ink-soft);
}

tbody tr:last-child td { border-bottom: none; }

/* --- blockquote: the aside note ---------------------------------------- */

blockquote {
  margin: 0 0 1.3rem;
  padding: 0.1rem 0 0.1rem 1.1rem;
  border-left: 2px solid var(--accent);
  color: var(--ink-soft);
}

blockquote p:last-child { margin-bottom: 0; }

/* --- instructor notice ------------------------------------------------- */

.notice {
  background: var(--notice-dim);
  border: 1px solid var(--notice);
  border-radius: 3px;
  color: var(--notice);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

/* --- index listing ----------------------------------------------------- */

ul.index { list-style: none; padding: 0; margin: 0 0 2.5rem; }

ul.index li { margin: 0; border-bottom: 1px solid var(--rule); }
ul.index li:first-child { border-top: 1px solid var(--rule); }

ul.index a {
  display: flex;
  gap: 1.2rem;
  align-items: baseline;
  padding: 0.95rem 0.2rem;
  text-decoration: none;
  color: var(--ink);
}

ul.index a:hover { background: var(--accent-dim); }
ul.index a:hover .idx-title { text-decoration: underline; text-underline-offset: 3px; }

.idx-kind {
  flex: 0 0 5.5rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.idx-title { font-weight: 600; }

.cross {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.8rem;
}

/* --- narrow screens ---------------------------------------------------- */

@media (max-width: 34rem) {
  body { font-size: 16px; }
  main { padding: 2rem 1.1rem 0; }
  .manhead { padding: 0.85rem 1.1rem; font-size: 0.62rem; letter-spacing: 0.05em; }
  .manhead-mid { display: none; }
  ul.index a { flex-direction: column; gap: 0.25rem; }
  .idx-kind { flex: none; }
  pre { font-size: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
