/*
 * plain.css — shared styling for the super-plain generated pages.
 *
 * Linked from the pages built by .github/scripts/build_plain_html.py,
 * build_library_html.py, and build_threads_html.py (docs/plain/,
 * docs/library/, docs/library/threads/). Deliberately framework-free and
 * script-free: a single small stylesheet that fixes line length, leading,
 * tables, and the thesis epigraph without pulling in any external assets.
 *
 * The retro page at docs/index.html has its own styles and does not use this.
 */

:root { color-scheme: light dark; }

body {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 4rem;
  font: 1.0625rem/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  color: #1a1a1a;
  background: #ffffff;
}

h1, h2, h3, h4 { line-height: 1.25; }
h1 { font-size: 1.7rem; margin-top: 0; }
h2 {
  font-size: 1.35rem;
  margin-top: 2rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid #e2e2e2;
}
h3 { font-size: 1.15rem; margin-top: 1.75rem; }

a { color: #1558b0; }
a:visited { color: #6a3aa6; }

/* Breadcrumb nav: the threads pages open with <nav> as the first body child.
   Keep it quiet and set it off from the title with a rule. */
body > nav:first-child {
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #e2e2e2;
  font-size: 0.85rem;
  color: #666666;
}

/* Tables run wide (the threads index, the per-meeting tables); allow them to
   scroll on narrow screens instead of forcing the page wider. */
table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.95rem;
}
th, td {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid #e2e2e2;
  text-align: left;
  vertical-align: top;
}
thead th { background: #f6f6f6; border-bottom: 2px solid #bbbbbb; }
tbody tr:nth-child(even) { background: #fafafa; }

/* The one-sentence thesis epigraph atop each brief renders as a blockquote. */
blockquote {
  margin: 1.25rem 0;
  padding: 0.3rem 0 0.3rem 1rem;
  border-left: 4px solid #bbbbbb;
  color: #555555;
  font-style: italic;
}

code {
  padding: 0.1em 0.35em;
  border-radius: 3px;
  background: #f0f0f0;
  font-size: 0.9em;
}
pre code { display: block; padding: 0.75rem; overflow-x: auto; }

img { max-width: 100%; }

/* Boilerplate AI-disclosure line rendered at the foot of every generated
   page (see utils/disclaimer.py). Deliberately quiet: smaller and dimmer
   than body text so it reads as fine print, not editorial content. */
.ai-disclaimer {
  margin-top: 2.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e2e2;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #767676;
}

@media (prefers-color-scheme: dark) {
  body { color: #e3e3e3; background: #121212; }
  a { color: #6ea8fe; }
  a:visited { color: #c08bf0; }
  h2 { border-bottom-color: #333333; }
  body > nav:first-child { border-bottom-color: #333333; color: #aaaaaa; }
  th, td { border-bottom-color: #333333; }
  thead th { background: #1e1e1e; border-bottom-color: #555555; }
  tbody tr:nth-child(even) { background: #181818; }
  blockquote { border-left-color: #555555; color: #b5b5b5; }
  code { background: #2a2a2a; }
  .ai-disclaimer { border-top-color: #333333; color: #8a8a8a; }
}
