.prose {
  max-width: 100%;
  min-width: 0;
  color: #d4d4d4;
  font-size: 17px;
  line-height: 1.8;
}

.prose > :first-child { margin-top: 0; }
.prose h1, .prose h2, .prose h3, .prose h4 {
  max-width: 100%;
  color: #fff;
  line-height: 1.22;
  overflow-wrap: anywhere;
}
.prose h1 { margin: 2.1em 0 .7em; font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; }
.prose h2 { margin: 1.9em 0 .7em; font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 800; }
.prose h3 { margin: 1.7em 0 .7em; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; text-decoration: underline; text-underline-offset: 8px; }
.prose h4 { margin: 1.5em 0 .6em; font-size: clamp(1.15rem, 2vw, 1.45rem); font-weight: 700; }
.prose h1::before, .prose h2::before, .prose h3::before, .prose h4::before {
  display: inline-block;
  margin-right: .38em;
  color: #626262;
  font: 500 .72em/1 'JetBrains Mono', monospace;
  vertical-align: .08em;
}
.prose h1::before { content: '#'; }
.prose h2::before { content: '##'; }
.prose h3::before { content: '###'; }
.prose h4::before { content: '####'; }

.prose p, .prose li { overflow-wrap: anywhere; }
.prose ul, .prose ol { margin: 0 0 1.35em; padding-left: 1.5rem; }
.prose li { margin: .55em 0; padding-left: .2rem; }
.prose li::marker { color: var(--accent-bright); }
.prose a { color: #60aee0; text-decoration-color: rgb(96 174 224 / .55); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { color: #a5dcfa; text-decoration-color: #a5dcfa; }
.prose blockquote {
  margin: 1.5em 0;
  padding: 16px 20px;
  border: 1px solid rgb(53 146 196 / .2);
  border-left: 4px solid var(--accent);
  border-radius: 0 6px 6px 0;
  background: linear-gradient(100deg, rgb(53 146 196 / .13), rgb(53 146 196 / .04) 70%, transparent);
  color: #d4d4d4;
  font-style: normal;
}
.prose blockquote p { margin: .15em 0; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { margin: 2.5rem 0; border: 0; border-top: 1px solid #383838; }
.prose figure.markdown-figure { width: fit-content; max-width: 100%; margin: 1.8rem auto; }
.prose figure.markdown-figure img { display: block; max-width: 100%; height: auto; margin: 0 auto; border: 1px solid var(--line); border-radius: 6px; }
.prose figure.markdown-figure figcaption { margin-top: .55rem; color: var(--muted); font-size: .86em; line-height: 1.5; text-align: center; }
.article-toc { position: fixed; z-index: 30; top: 50%; right: 18px; display: flex; flex-direction: column; gap: 2px; overflow: visible; padding: 6px 4px; transform: translateY(-50%); }
.article-toc[hidden] { display: none; }
.article-toc-link { position: relative; display: flex; width: 16px; min-height: 13px; flex: none; align-items: center; justify-content: center; border-radius: 3px; text-decoration: none; }
.article-toc-line { display: block; width: 2px; height: 6px; flex: none; border-radius: 2px; background: #626262; transition: height .16s ease, background-color .16s ease; }
.article-toc-title { position: absolute; right: 25px; width: max-content; max-width: min(280px, 65vw); padding: 7px 10px; border: 1px solid #303030; border-radius: 5px; background: #111; box-shadow: 0 4px 16px rgb(0 0 0 / .35); color: #d4d4d4; font-size: 12px; line-height: 1.4; opacity: 0; pointer-events: none; transform: translateX(4px); transition: opacity .16s ease, transform .16s ease; }
.article-toc-link[aria-current="location"] .article-toc-line { height: 16px; background: var(--accent-bright); }
.article-toc-link[aria-current="location"] .article-toc-title,.article-toc-link:hover .article-toc-title,.article-toc-link:focus-visible .article-toc-title { opacity: 1; transform: translateX(0); }
.article-toc-link:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; }
@media (max-width: 900px) { .article-toc { display: none; } }
@media (prefers-reduced-motion: reduce) { .article-toc-line,.article-toc-title { transition: none; } }
.prose :not(pre) > code {
  padding: .12em .38em;
  border: 1px solid #303030;
  border-radius: 4px;
  background: #1b1b1b;
  color: #9bd5f2;
  font: .86em/1.5 'JetBrains Mono', monospace;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  vertical-align: baseline;
}

.table-scroll {
  width: 100%;
  max-width: 100%;
  margin: 1.5rem 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #303030;
  border-radius: 6px;
  background: #0b0b0b;
}
.table-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.prose table.markdown-table { display: table; width: 100%; min-width: 0; max-width: 100%; table-layout: fixed; margin: 0; border: 0; border-collapse: collapse; border-spacing: 0; font-size: 15px; }
.prose .markdown-table thead { position: static; background: #1b1b1b; }
.prose .markdown-table th, .prose .markdown-table td { min-width: 0; padding: 11px 14px; border: 0; border-bottom: 1px solid #303030; text-align: left; vertical-align: top; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.prose .markdown-table th { color: #fff; font-weight: 700; }
.prose .markdown-table tbody tr:nth-child(odd) { background: #101010; }
.prose .markdown-table tbody tr:nth-child(even) { background: #151515; }
.prose .markdown-table tbody tr:hover { background: #202020; }
.prose .markdown-table td img { width: auto; min-width: 0; max-width: 100%; max-height: 320px; margin: 4px auto; object-fit: contain; border: 0; border-radius: 4px; }
.prose .markdown-table tbody tr:last-child td { border-bottom: 0; }

.code-block { max-width: 100%; min-width: 0; margin: 1.5rem 0; overflow: hidden; border: 1px solid #303030; border-radius: 7px; background: #0b0b0b; box-shadow: 0 8px 24px rgb(0 0 0 / .16); }
.code-block-head { display: flex; min-height: 38px; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 10px 5px 14px; border-bottom: 1px solid #292929; background: #121212; color: #9b9b9b; }
.code-block-language { color: #a9a9a9; font: 10px 'JetBrains Mono', monospace; letter-spacing: .08em; text-transform: uppercase; }
.copy-code { display: inline-flex; min-height: 30px; align-items: center; justify-content: center; padding: 4px 9px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #aaa; font: 11px 'Mona Sans', sans-serif; cursor: pointer; transition: background-color .16s, border-color .16s, color .16s; }
.copy-code:hover { border-color: #393939; background: #202020; color: #fff; }
.copy-code:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
.code-block-body { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch; scrollbar-color: #444 #111; scrollbar-width: thin; }
.code-block-body pre:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: -2px; }
.code-block-body pre, .prose .code-block pre { width: max-content; min-width: 100%; max-width: none; margin: 0 !important; padding: 14px 16px !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; color: #dedede; font: 13px/1.7 'JetBrains Mono', monospace !important; white-space: pre !important; tab-size: 2; }
.code-block-body code { font: inherit !important; white-space: inherit; overflow-wrap: normal; }
.prose pre:not(.code-block pre) { max-width: 100%; overflow: auto; padding: 16px; border: 1px solid #303030; border-radius: 6px; background: #0d0d0d; color: #e0e0e0; font: 13px/1.7 'JetBrains Mono', monospace; }

.search-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 18px; margin-bottom: 24px; }
.search-label { grid-column: 1 / -1; color: #c8c8c8; font-size: 13px; font-weight: 600; }
.content-search { width: 100%; min-width: 0; min-height: 46px; padding: 10px 14px; border: 1px solid #343434; border-radius: 5px; background: #111; color: #f5f5f5; font: 15px 'Mona Sans', sans-serif; }
.content-search::placeholder { color: #777; }
.content-search:focus-visible { border-color: var(--accent); outline: 2px solid rgb(85 184 237 / .3); outline-offset: 2px; }
.search-count { margin: 0; color: #929292; font-size: 12px; text-align: right; }
.search-empty { grid-column: 1 / -1; margin: 4px 0; color: #9b9b9b; }
.search-item { min-width: 0; }
.search-item[hidden] { display: none; }
.search-grid { display: grid; }

.achievement-timeline .timeline-rail { left: 28px; }
.achievement-timeline .timeline-date { padding-left: 46px; }
.achievement-timeline .timeline-dot { left: 18px; }

@media (max-width: 760px) {
  .prose { font-size: 16px; line-height: 1.75; }
  .prose h1 { font-size: 2rem; }
  .prose h2 { font-size: 1.7rem; }
  .prose h3 { font-size: 1.4rem; }
  .prose h4 { font-size: 1.15rem; }
  .prose .markdown-table { font-size: 13px; }
  .prose .markdown-table th, .prose .markdown-table td { padding: 9px 11px; }
  .prose .markdown-table td img { max-width: 240px; }
  .code-block-body pre, .prose pre:not(.code-block pre) { font-size: 12px !important; }
  .code-block-body pre { padding: 12px 14px !important; }
  .copy-code { min-height: 36px; }
  .search-toolbar { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .search-label { grid-column: auto; }
  .search-count { text-align: left; }
  .achievement-timeline .timeline-rail { left: 9px; }
  .achievement-timeline .timeline-date { padding-left: 14px; }
  .achievement-timeline .timeline-dot { left: -41px; }
}