/* ODI Blog — standalone stylesheet (does not touch the main site).
   Design source: claude.ai/design odi-website / "ODI Blog.dc.html" */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.blog {
  font-family: 'Hanken Grotesk', sans-serif;
  color: #26282b;
  background: #fefefd;
  -webkit-font-smoothing: antialiased;
}
.blog a { text-decoration: none; color: inherit; }
.blog a:hover { color: #1f2123; }
.blog ul { margin: 0; padding: 0; list-style: none; }

/* ---------- header / footer ---------- */
.blog-header { border-bottom: 1px solid #ececec; }
.blog-header-inner {
  max-width: 1240px; margin: 0 auto; height: 64px; padding: 0 44px;
  display: flex; align-items: center; gap: 24px;
}
.blog-brand { display: flex; align-items: center; gap: 10px; }
.blog-brand img { height: 18px; display: block; }
.blog-brand-suffix {
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 12px;
  letter-spacing: 0.16em; text-transform: uppercase; color: #8a8f8b;
}
.blog-header .rss-link { margin-left: auto; font-family: monospace; font-size: 12px; color: #9aa09b; }
.blog-header .back-link { margin-left: auto; font-size: 13.5px; font-weight: 600; color: #5c6063; }
.blog-header .site-pill {
  display: inline-flex; align-items: center; height: 32px; padding: 0 14px;
  border-radius: 100px; border: 1.5px solid #dde1db;
  font-size: 12.5px; font-weight: 600; color: #5c6063; white-space: nowrap;
}
.blog-footer { border-top: 1px solid #ececec; }
.blog-footer-inner {
  max-width: 1240px; margin: 0 auto; padding: 28px 44px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13.5px; color: #8a8f8b;
}
.blog-footer a { font-weight: 600; color: #5c6063; }

/* ---------- shared three-column shell ---------- */
.blog-shell {
  max-width: 1240px; margin: 0 auto; padding: 64px 44px 72px;
  display: grid; grid-template-columns: 200px minmax(0, 640px) 1fr;
  gap: 56px; align-items: start;
}

/* left rail (topics / contents) */
.rail-label {
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase; color: #8a8f8b; margin-bottom: 14px;
}
.rail-nav { display: flex; flex-direction: column; gap: 32px; padding-top: 8px; }
.rail-list {
  display: flex; flex-direction: column; gap: 10px;
  font-size: 13.5px; border-left: 2px solid #ececec;
}
.rail-list li a, .rail-list li span.rail-item {
  display: block; padding-left: 14px; color: #6f7376;
}
.rail-list li.active { border-left: 2px solid #69be8c; margin-left: -2px; }
.rail-list li.active a, .rail-list li.active span.rail-item { color: #1f2123; font-weight: 600; }
.rail-count { font-family: monospace; font-size: 11.5px; color: #9aa09b; }

/* right rail cards */
.side-rail { padding-top: 8px; display: flex; flex-direction: column; gap: 28px; }
.side-card { border-top: 2px solid #1f2123; padding-top: 12px; }
.side-card-label { font-family: monospace; font-size: 11.5px; color: #9aa09b; margin-bottom: 6px; }
.side-card p { margin: 0; font-size: 13px; line-height: 1.6; color: #54585b; }
.side-card p + a, .side-card .side-card-link { display: block; margin-top: 8px; }
.side-card a { display: block; font-size: 13px; font-weight: 600; line-height: 1.5; color: #26282b; }

/* ---------- index ---------- */
.blog-index-title {
  font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 34px;
  line-height: 1.18; letter-spacing: -0.01em; color: #1f2123; margin: 0 0 14px;
}
.blog-index-desc {
  font-family: 'Source Serif 4', serif; font-size: 17px; line-height: 1.7;
  color: #45494c; margin: 0 0 44px;
}
.post-list li { border-top: 1px solid #ececec; padding: 26px 0; }
.post-list li:last-child { border-bottom: 1px solid #ececec; }
.post-kicker { font-family: monospace; font-size: 12px; color: #9aa09b; margin-bottom: 8px; }
.post-list-title {
  display: block; font-family: 'Montserrat', sans-serif; font-weight: 700;
  font-size: 20px; line-height: 1.3; color: #1f2123; margin-bottom: 8px;
}
.post-teaser {
  font-family: 'Source Serif 4', serif; font-size: 15.5px; line-height: 1.65;
  color: #54585b; margin: 0 0 10px;
}
.post-byline { font-size: 13px; color: #6f7376; }
.post-byline .author { font-weight: 600; color: #26282b; }
.post-list-meta {
  display: flex; justify-content: space-between; align-items: center; margin-top: 28px;
  font-family: monospace; font-size: 12px; color: #9aa09b;
}

/* ---------- article ---------- */
.post-meta-line { font-family: monospace; font-size: 12.5px; color: #8a8f8b; margin-bottom: 16px; }
.post-title {
  font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 34px;
  line-height: 1.18; letter-spacing: -0.01em; color: #1f2123; margin: 0 0 16px;
}
.post-author-line { font-size: 14px; color: #6f7376; margin-bottom: 36px; }
.post-author-line .author { font-weight: 700; color: #26282b; }

.post-body {
  font-family: 'Source Serif 4', serif; font-size: 17.5px; line-height: 1.75; color: #2c2f31;
}
.post-body h2 {
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 15px;
  letter-spacing: 0.06em; text-transform: uppercase; color: #1f2123; margin: 36px 0 16px;
}
.post-body > *:first-child { margin-top: 0; }
.post-body > section:first-child > h2:first-child { margin-top: 0; }
.post-body h3 {
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 13.5px;
  letter-spacing: 0.04em; color: #1f2123; margin: 30px 0 14px;
}
.post-body p { margin: 0 0 24px; }
.post-body p:last-child { margin-bottom: 0; }
.post-body em { font-style: italic; }

/* in-content links */
.post-body a {
  color: #3e8a5e;
  text-decoration: underline;
  text-decoration-color: #69be8c;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.post-body a:hover { color: #2f6b49; text-decoration-thickness: 2.5px; }

/* abstract box */
.post-body #abstract, .post-abstract {
  border: 1px solid #e7eae4; background: #f8f9f7; border-radius: 12px;
  padding: 22px 26px; margin-bottom: 36px;
  font-size: 14.5px; line-height: 1.7; color: #45494c;
}
.post-body #abstract h2 {
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase; color: #6f9f76; margin: 0 0 8px;
}
.post-body #abstract p { margin: 0 0 12px; }
.post-body #abstract p:last-child { margin-bottom: 0; }

/* theorem / statement boxes */
.post-body .theorem {
  border: 1px solid #e7eae4; background: #f8f9f7; border-radius: 12px;
  padding: 20px 24px; margin: 0 0 24px; font-size: 16px; line-height: 1.7;
}
.post-body .theorem-label {
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase; color: #6f9f76; margin-bottom: 8px;
}
.post-body .theorem p { margin: 0; }

/* display math */
.post-body mjx-container[display="true"] { margin: 0 0 24px !important; overflow-x: auto; overflow-y: hidden; }

/* figures */
.post-body figure { margin: 0 0 32px; }
.post-body figure img { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.post-body figcaption {
  font-family: 'Hanken Grotesk', sans-serif; font-size: 13px; line-height: 1.55;
  color: #8a8f8b; margin-top: 12px;
}
.post-body .fig-row { display: flex; gap: 1rem; justify-content: center; align-items: flex-start; margin: 0 0 32px; }
.post-body .fig-row figure { flex: 1 1 0; min-width: 0; text-align: center; margin: 0; }
.post-body .fig-row img { width: 100%; }
.post-body .hb-figure img {
  border: 1px solid #e7eae4; border-radius: 12px; padding: 10px; background: #fff;
}
.post-body .fig-narrow img { max-width: 82%; }

/* lede */
.post-body .post-lede {
  font-family: 'Hanken Grotesk', sans-serif; font-size: 16px; line-height: 1.6;
  color: #6f7376; margin: -12px 0 28px;
}

/* lists */
.post-body ul, .post-body ol { margin: 0 0 24px; padding-left: 1.4em; }
.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }
.post-body li { margin-bottom: 10px; }
.post-body li:last-child { margin-bottom: 0; }
.post-body li > ul, .post-body li > ol { margin: 10px 0 0; }

/* block quotes */
.post-body blockquote {
  margin: 0 0 24px; padding: 2px 0 2px 24px;
  border-left: 2px solid #69be8c; color: #45494c;
}
.post-body blockquote p { margin: 0 0 12px; }
.post-body blockquote p:last-child { margin-bottom: 0; }
.post-body blockquote .quote-attrib {
  font-family: 'Hanken Grotesk', sans-serif; font-size: 13.5px; color: #8a8f8b;
}

/* tables */
.post-body .table-wrap { overflow-x: auto; margin: 0 0 32px; }
.post-body table {
  border-collapse: collapse; width: 100%; min-width: 460px;
  font-family: 'Hanken Grotesk', sans-serif; font-size: 14.5px; line-height: 1.5;
}
.post-body th, .post-body td { text-align: left; padding: 11px 14px; vertical-align: top; }
.post-body thead th {
  font-weight: 700; color: #1f2123; border-bottom: 1px solid #d8ddd6;
  font-size: 12.5px; letter-spacing: 0.04em; text-transform: uppercase;
}
.post-body tbody td { border-top: 1px solid #ececec; color: #45494c; }
.post-body tbody tr:last-child td { border-bottom: 1px solid #ececec; }
.post-body th:first-child, .post-body td:first-child { padding-left: 0; }
.post-body th:last-child, .post-body td:last-child { padding-right: 0; }

/* references */
.post-body ol.references {
  margin: 0; padding-left: 0; list-style: none;
  display: flex; flex-direction: column; gap: 10px;
  font-size: 14.5px; line-height: 1.6; color: #45494c;
}
.post-body .ref-key { font-family: monospace; font-size: 12.5px; color: #6f9f76; margin-right: 6px; }

/* cite box */
.post-cite { margin-top: 44px; border-top: 1px solid #ececec; padding-top: 28px; }
.post-cite pre {
  margin: 0; font-family: monospace; font-size: 12.5px; line-height: 1.6; color: #54585b;
  background: #f8f9f7; border: 1px solid #e7eae4; border-radius: 10px;
  padding: 18px 20px; white-space: pre-wrap;
}

/* prev / next */
.post-pager { margin-top: 36px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.post-pager a {
  display: flex; flex-direction: column; gap: 6px;
  border: 1px solid #e7eae4; border-radius: 12px; padding: 18px 22px;
}
.post-pager a.next { text-align: right; }
.post-pager .pager-kicker { font-family: monospace; font-size: 11.5px; color: #9aa09b; }
.post-pager .pager-title {
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 15px;
  line-height: 1.35; color: #1f2123;
}

/* article rails */
.toc-rail { padding-top: 8px; position: sticky; top: 24px; }
.post-side-rail { padding-top: 148px; }

/* ---------- responsive ---------- */
@media (max-width: 1160px) {
  .blog-shell { grid-template-columns: 200px minmax(0, 1fr); }
  .side-rail.index-rail { display: none; }
  .post-side-rail { grid-column: 2; padding-top: 0; }
}
@media (max-width: 860px) {
  .blog-header-inner, .blog-footer-inner { padding-left: 24px; padding-right: 24px; }
  .blog-shell { grid-template-columns: minmax(0, 1fr); padding: 40px 24px 56px; gap: 40px; }
  .blog-shell > main, .blog-shell > article { min-width: 0; }
  .toc-rail { display: none; }
  .rail-nav { flex-direction: row; flex-wrap: wrap; gap: 32px; padding-top: 0; }
  .post-side-rail { grid-column: 1; }
}
