/* Article styles extracted from latentbound.html and dsbl-framework.html.
   Existing pages remain unchanged. Tooltips require an explicit data-note. */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #fefcf4;
  color: #3c3836;
  font-family: 'Crimson Pro', serif;
  font-weight: 400;
  font-size: 1.15rem;
  line-height: 1.7;
  padding: 10rem 1.5rem 4rem;
}

article {
  max-width: 620px;
  margin: 0 auto;
}

h1 {
  font-weight: 600;
  font-size: 1.8rem;
  margin-top: 1.5rem;
  margin-bottom: 0.1rem;
}

h2 {
  font-weight: 600;
  font-size: 1.4rem;
  margin-top: 3rem;
  margin-bottom: 0.5rem;
}

h3 {
  font-weight: 600;
  font-size: 1.15rem;
  margin-top: 2rem;
  margin-bottom: 0.4rem;
}

h4 {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

p {
  margin-bottom: 0.8rem;
}

.subtitle {
  font-style: italic;
  color: #665c54;
  margin-bottom: 2.5rem;
}

.archive-ref {
  font-size: 0.7rem;
  color: #a89984;
  text-align: right;
  margin-bottom: -0.5rem;
}

.opening-sentence {
  font-weight: 600;
}

a {
  color: #076678;
  text-decoration: none;
}

blockquote {
  margin: 1.2rem 0;
  padding-left: 1.2rem;
  border-left: 2px solid #d5c4a1;
  font-style: italic;
  color: #504945;
}

ul, ol {
  margin: 0.5rem 0 0.8rem 1.5rem;
}

li {
  margin-bottom: 0.3rem;
}

code {
  font-family: monospace;
  font-size: 0.95rem;
  background: #f3edd3;
  padding: 0.1rem 0.3rem;
  border-radius: 2px;
}

pre {
  margin: 1rem 0;
  padding: 1rem;
  background: #f3edd3;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.4;
  text-align: center;
}

pre code {
  display: inline-block;
  text-align: left;
  background: none;
  padding: 0;
}

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

th, td {
  text-align: left;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid #d5c4a1;
  vertical-align: top;
}

th {
  font-weight: 600;
}

.table-borderless td {
  border: none;
  padding: 0.3rem 1rem 0.3rem 0;
  vertical-align: middle;
}

.example-box {
  margin: 0.8rem 0;
  padding: 0.6rem 0 0.6rem 1rem;
  border-left: 2px solid #d5c4a1;
}

.example-box h4 {
  margin-bottom: 0.2rem;
}

.example-box p {
  margin-bottom: 0.3rem;
}

img.responsive-diagram {
  max-width: 180px;
  height: auto;
}

.fn-ref {
  font-size: 0.75rem;
  vertical-align: super;
  line-height: 0;
  color: #076678;
  position: relative;
  cursor: help;
}

.fn-ref[data-note]:hover::after {
  content: attr(data-note);
  position: absolute;
  left: 0;
  bottom: 1.5em;
  width: 280px;
  padding: 0.6rem 0.8rem;
  background: #f3edd3;
  color: #3c3836;
  font-size: 0.85rem;
  line-height: 1.5;
  vertical-align: baseline;
  z-index: 10;
  border: 1px solid #d5c4a1;
}

.footnotes {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid #d5c4a1;
  font-size: 0.9rem;
  color: #504945;
  line-height: 1.6;
}

.footnotes p {
  margin-bottom: 0.6rem;
}

.footnotes .fn-num {
  font-size: 0.75rem;
  vertical-align: super;
  line-height: 0;
  font-weight: 600;
}

hr {
  border: none;
  height: 1px;
  background: #d5c4a1;
  margin: 2rem 0;
}

nav.toc {
  margin-bottom: 2.5rem;
  font-size: 0.95rem;
}

nav.toc .toc-title {
  font-weight: 600;
  margin-bottom: 0.3rem;
}

nav.toc a {
  display: block;
  padding-left: 1rem;
  margin-bottom: 0.15rem;
}

footer {
  margin-top: 2.5rem;
  font-size: 0.9rem;
  color: #665c54;
}

.back-link {
  margin-top: 2rem;
}

/* Additional article rules from dsbl-framework.html. */
.publication-note {
  font-size: 0.95rem;
  color: #665c54;
  margin-top: 1rem;
}

.github-note {
  font-size: 0.95rem;
  color: #665c54;
}

.pdf-link {
  color: #9d0006;
}

@media (max-width: 600px) {
  body {
    padding: 3rem 1.2rem 3rem;
    font-size: 1.05rem;
  }

  img.responsive-diagram {
    max-width: 140px;
  }

  .table-borderless td {
    display: block;
    padding: 0.3rem 0;
  }
}
