/* ==========================================================================
   Seiri blog — layered on top of seiri.css
   Long-form reading in the same system as the product site.
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Cascade
   seiri.css styles bare content links (`main a:not([class])`) for the
   marketing pages, which have no .prose wrapper. On the blog that rule would
   underline every title and nav link, so it is reset here and re-asserted for
   article body copy only. Both selectors out-specify the original.
   -------------------------------------------------------------------------- */

main a:not([class]) { color: inherit; text-decoration: none; }

.prose a:not([class]) {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2.5px;
}
.prose a:not([class]):hover { color: var(--accent-hi); }

/* --------------------------------------------------------------------------
   1. Post list
   -------------------------------------------------------------------------- */

.blog-hero {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--line);
}
.blog-hero h1 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 620;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 12px 0 14px;
}
.blog-hero p {
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--text-2);
  max-width: 58ch;
}

.post-list { display: flex; flex-direction: column; }

.post-item {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 28px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
@media (max-width: 700px) {
  .post-item { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}

.post-item__date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  padding-top: 3px;
  white-space: nowrap;
}

.post-item__title {
  font-size: 19px;
  font-weight: 560;
  letter-spacing: -0.022em;
  line-height: 1.3;
  margin-bottom: 7px;
}
.post-item__title a:not([class]) { color: var(--text); text-decoration: none; }
.post-item__title a:not([class]):hover { color: var(--accent); }

.post-item__sum {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-2);
  max-width: 68ch;
  margin-bottom: 10px;
}

.post-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}

/* --------------------------------------------------------------------------
   2. Article
   -------------------------------------------------------------------------- */

.article-head {
  padding: 52px 0 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}
.article-head h1 {
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 620;
  letter-spacing: -0.034em;
  line-height: 1.1;
  margin: 14px 0 16px;
  max-width: 24ch;
}
.article-head__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-3);
}
.article-head__meta .sep { opacity: .5; }

.crumb {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-3);
}
.crumb a { color: var(--text-3); text-decoration: none; }
.crumb a:hover { color: var(--accent); }

/* Reading measure: ~68 characters. */
.prose {
  font-size: 16.5px;
  line-height: 1.72;
  color: var(--text);
  max-width: 68ch;
}

.prose > * + * { margin-top: 1.15em; }

.prose h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.026em;
  line-height: 1.25;
  margin-top: 2.2em;
  margin-bottom: .1em;
  padding-top: 1.1em;
  border-top: 1px solid var(--line);
}
.prose h3 {
  font-size: 18.5px;
  font-weight: 580;
  letter-spacing: -0.02em;
  margin-top: 1.9em;
  margin-bottom: .1em;
}
.prose h4 {
  font-size: 16px;
  font-weight: 580;
  margin-top: 1.6em;
  margin-bottom: .1em;
}

.prose p { color: var(--text); }

/* Body links only — anything with a class (buttons, chips) keeps its own look.
   See the cascade note in section 0. */

.prose strong { font-weight: 600; color: var(--text); }

.prose ul, .prose ol { padding-left: 1.35em; }
.prose li { margin-top: .45em; }
.prose ul { list-style: none; padding-left: 1.1em; }
.prose ul > li { position: relative; }
.prose ul > li::before {
  content: '';
  position: absolute;
  left: -1.05em;
  top: .72em;
  width: 5px;
  height: 1px;
  background: var(--line-2);
}
.prose ol { list-style: decimal; }
.prose ol > li::marker {
  font-family: var(--font-mono);
  font-size: .85em;
  color: var(--text-3);
}

.prose blockquote {
  border-left: 2px solid var(--accent);
  padding: 2px 0 2px 18px;
  margin-left: 0;
  color: var(--text-2);
  font-style: normal;
}
.prose blockquote p { color: var(--text-2); }

.prose img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  display: block;
}
.prose img + em {
  display: block;
  margin-top: .6em;
  font-size: 12.5px;
  font-style: normal;
  color: var(--text-3);
  text-align: center;
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.4em 0;
}

/* Inline code */
.prose :not(pre) > code {
  font-family: var(--font-mono);
  font-size: .855em;
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  padding: 1.5px 5px;
  color: var(--text);
  overflow-wrap: anywhere;
}

/* Block code — the terminal aesthetic, matching the product site. */
.prose pre,
.highlight pre,
pre.chroma {
  background: var(--ink) !important;
  color: var(--text-dark) !important;
  border: 1px solid var(--ink-3) !important;
  border-radius: var(--r-lg) !important;
  padding: 16px 18px !important;
  overflow-x: auto !important;
  font-family: var(--font-mono) !important;
  font-size: 13px !important;
  line-height: 1.75 !important;
  white-space: pre !important;
}
.prose pre code {
  background: none !important;
  border: 0 !important;
  padding: 0 !important;
  font-size: inherit !important;
  color: inherit !important;
  white-space: pre !important;
}
.highlight { margin: 0; border-radius: var(--r-lg); overflow: hidden; }

/* Code block scrollbar */
.prose pre::-webkit-scrollbar { height: 8px; }
.prose pre::-webkit-scrollbar-track { background: transparent; }
.prose pre::-webkit-scrollbar-thumb {
  background: var(--ink-4);
  border-radius: 4px;
}
.prose pre::-webkit-scrollbar-thumb:hover { background: #3a3f4a; }

/* Tables */
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  display: block;
  overflow-x: auto;
}
.prose thead th {
  text-align: left;
  font-weight: 560;
  font-size: 12.5px;
  color: var(--text-2);
  border-bottom: 1px solid var(--line-2);
  padding: 8px 12px 8px 0;
  white-space: nowrap;
}
.prose tbody td {
  padding: 9px 12px 9px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

/* --------------------------------------------------------------------------
   3. Article furniture
   -------------------------------------------------------------------------- */

.toc {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--paper-2);
  padding: 16px 18px;
  margin-bottom: 34px;
}
.toc__h {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-3);
  margin-bottom: 10px;
}
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 1px 0; }
.toc a {
  display: block;
  padding: 2px 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-2);
  text-decoration: none;
}
.toc a:hover { color: var(--accent); }
.toc ul ul { padding-left: 13px; }
.toc ul ul a { color: var(--text-3); font-size: 12.5px; }

/* Long guides get a two-column contents block rather than a full screen. */
@media (min-width: 760px) {
  .toc > ul { columns: 2; column-gap: 32px; }
  .toc > ul > li { break-inside: avoid; }
}

.post-cta {
  margin: 48px 0 8px;
  border: 1px solid var(--ink-3);
  border-radius: var(--r-lg);
  background: var(--ink);
  padding: 26px 24px;
  color: var(--text-dark-2);
}
.post-cta h3 {
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.022em;
  margin-bottom: 8px;
}
.post-cta p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-dark-2);
  margin-bottom: 16px;
  max-width: 56ch;
}

.cta-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}
.cta-features li {
  position: relative;
  padding-left: 17px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dark-3);
}
.cta-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  width: 5px;
  height: 9px;
  border: solid var(--ok-dark);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(42deg);
}

/* The shortcode renders inside .prose, so every prose list/link rule has to be
   unwound on it explicitly — hence the long selectors. */
.prose .post-cta > * + * { margin-top: 0; }
.prose .post-cta a.btn { text-decoration: none; color: var(--ink); }
.prose .post-cta ul.cta-features { padding-left: 0; margin: 20px 0 0; }
.prose .post-cta .cta-features li { margin-top: 0; padding-left: 17px; }
.prose .post-cta .cta-features li::before {
  left: 0;
  top: 5px;
  width: 5px;
  height: 9px;
  background: none;
  border: solid var(--ok-dark);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(42deg);
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 40px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
@media (max-width: 640px) { .post-nav { grid-template-columns: 1fr; } }
.post-nav a {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  text-decoration: none;
  transition: border-color .13s ease;
}
.post-nav a:hover { border-color: var(--line-2); }
.post-nav .lbl {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-3);
  margin-bottom: 6px;
}
.post-nav .ttl {
  font-size: 14px;
  font-weight: 520;
  color: var(--text);
  line-height: 1.4;
}
.post-nav .is-next { text-align: right; }

/* Related posts */
.related {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

/* Lightbox: keep it, tone it down. */
#lightbox { background: rgba(11, 12, 14, .92) !important; }
#lightbox-image { border-radius: var(--r-lg); box-shadow: none !important; }
