@font-face {
  font-family: "Journal Inter";
  src: url("/journal/assets/inter-latin.woff2") format("woff2");
  font-display: swap;
  font-weight: 400;
}
@font-face {
  font-family: "Journal Inter";
  src: url("/journal/assets/inter-cyrillic.woff2") format("woff2");
  font-display: swap;
  font-weight: 400;
  unicode-range: U+0400-052F;
}
@font-face {
  font-family: "Journal Inter";
  src: url("/journal/assets/inter-latin-500.woff2") format("woff2");
  font-display: swap;
  font-weight: 500;
}
@font-face {
  font-family: "Journal Inter";
  src: url("/journal/assets/inter-cyrillic-500.woff2") format("woff2");
  font-display: swap;
  font-weight: 500;
  unicode-range: U+0400-052F;
}
@font-face {
  font-family: "Journal Inter";
  src: url("/journal/assets/inter-latin-600.woff2") format("woff2");
  font-display: swap;
  font-weight: 600;
}
@font-face {
  font-family: "Journal Inter";
  src: url("/journal/assets/inter-cyrillic-600.woff2") format("woff2");
  font-display: swap;
  font-weight: 600;
  unicode-range: U+0400-052F;
}
@font-face {
  font-family: "Journal Inter";
  src: url("/journal/assets/inter-latin-700.woff2") format("woff2");
  font-display: swap;
  font-weight: 700;
}
@font-face {
  font-family: "Journal Inter";
  src: url("/journal/assets/inter-cyrillic-700.woff2") format("woff2");
  font-display: swap;
  font-weight: 700;
  unicode-range: U+0400-052F;
}
.breadcrumbs {
  display: flex;
  gap: 14px;
  margin: 42px 0;
  font-size: 13px;
  color: var(--text-muted);
}
.article-header {
  max-width: 950px;
  margin: 0 auto 40px;
}
.article-header h1 {
  font-size: clamp(36px, 4.6vw, 60px);
  line-height: 1.12;
  letter-spacing: -0.04em;
  margin: 24px 0;
}
.lead {
  font-size: 21px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 24px 0;
}
.cover {
  margin: 0 0 60px;
  border-radius: 20px;
  overflow: hidden;
}
.cover img {
  display: block;
  width: 100%;
  max-height: 620px;
  object-fit: cover;
}
.reading-layout {
  display: flex;
  align-items: flex-start;
  gap: 56px;
  justify-content: center;
}
.prose {
  max-width: 760px;
  min-width: 0;
  width: 100%;
  font-size: 18px;
  line-height: 1.85;
  overflow-wrap: anywhere;
  color: var(--text-secondary);
}
.prose > :first-child {
  margin-top: 0;
}
.prose h2,
.prose h3,
.prose h4 {
  color: var(--text-primary);
  line-height: 1.3;
  /* The site shell already reserves the fixed header in scroll-padding-top. */
  scroll-margin-top: 12px;
}
.prose h2 {
  font-size: 32px;
  margin-top: 56px;
  letter-spacing: -0.7px;
}
.prose h3 {
  font-size: 25px;
  margin-top: 36px;
}
.prose p {
  margin: 24px 0;
}
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.prose figure {
  margin: 36px 0;
}
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
}
.prose .image-left {
  max-width: 70%;
  margin-right: auto;
}
.prose .image-center {
  max-width: 85%;
  margin-inline: auto;
}
.prose figcaption {
  font-size: 13px;
  color: var(--text-muted);
  margin: 12px 0;
  text-align: center;
}
.prose blockquote {
  margin: 36px 0;
  padding: 4px 24px;
  border-left: 3px solid var(--accent);
  color: var(--text-primary);
  font-size: 21px;
}
.table-scroll {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 32px 0;
}
.prose table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
}
.prose th,
.prose td {
  text-align: left;
  padding: 14px 18px;
  min-width: 130px;
  border-bottom: 1px solid var(--border);
}
.prose th {
  background: var(--bg-card);
  color: var(--text-primary);
}
.prose pre {
  overflow: auto;
  max-width: 100%;
  padding: 22px;
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}
.prose code {
  font-family: Consolas, monospace;
}
.prose .code-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 30px 0;
  overflow: hidden;
}
.prose .code-block > div {
  padding: 10px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}
.copy-code {
  background: transparent;
  color: var(--text-secondary);
  border: 0;
  font-size: 12px;
  padding: 6px;
}
.callout {
  background: var(--bg-secondary);
  padding: 6px 24px;
  border-left: 3px solid var(--accent);
  margin: 32px 0;
  border-radius: 0 12px 12px 0;
}
.callout.warning {
  border-color: #eab308;
}
.callout.tip {
  border-color: #4ade80;
}
.article-cta {
  padding: 24px 32px;
  margin: 40px 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-secondary);
}
.article-cta a.button {
  display: inline-block;
  background: var(--accent);
  color: var(--action-primary-text);
  font-size: 15px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
  margin-top: 42px;
}
.share {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  border-block: 1px solid var(--border);
  padding: 22px 0;
  margin-top: 32px;
  font-size: 13px;
}
.share a {
  text-decoration: none;
}
.related {
  margin-top: 80px;
}
.related > h2 {
  font-size: 28px;
  font-weight: 550;
  margin-bottom: 32px;
}
.preview-banner,
.notice {
  padding: 16px;
  background: #24344c;
  color: #dceaff;
  border-radius: 8px;
  margin: 20px 0;
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html { scrollbar-width:thin; scrollbar-color:var(--scrollbar-thumb) var(--bg-primary); scrollbar-gutter: stable; scroll-padding-top: 88px; scroll-behavior:auto; }
body.page-internal { overflow-x:clip; scroll-behavior:auto; }
#main {
  font-family:"Journal Inter",Inter,system-ui,sans-serif;
  width:min(90%,1176px); margin-inline:auto; padding-top:82px; min-height:72vh;
  padding-bottom:clamp(42px,6vw,80px);
}
#main a { color:var(--accent); text-decoration:none; }
#main a:hover { text-decoration:none; }
#main :is(button,input) { font:inherit; }
#main :is(a,button,summary,pre,[tabindex]):focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
#main .section-header { padding:clamp(34px,5vw,70px) 0 0; margin-bottom:clamp(26px,3vw,44px); }
#main .section-header h1 { font-size:clamp(2.15rem,4vw,3.5rem); margin-bottom:.75rem; }
.filter-bar { display:flex; align-items:center; flex-wrap:wrap; justify-content:space-between; gap:16px; padding:15px 0; border-block-start:1px solid var(--border); }
.categories { display:flex; flex-wrap:wrap; align-items:center; gap:8px 18px; }
#main .categories a { display:inline-flex; align-items:center; min-height:40px; border-bottom:2px solid transparent; color:var(--text-secondary); font-size:.94rem; }
#main .categories a[aria-current] { border-color:var(--accent); color:var(--text-primary); }
.journal-search { display:flex; align-items:stretch; gap:8px; max-width:100%; }
.journal-search .form-group { flex:1; min-width:0; }
.journal-search input { width:100%; height:42px; padding:0 14px; border-radius:8px; }
.journal-search .btn { padding:0 17px; min-height:42px; }
.journal-search input:focus-visible { outline:none; border-color:var(--control-border-focus); box-shadow:inset 0 0 0 1px var(--control-border-focus); }
#main #projects { padding:0; overflow:visible; min-height:34vh; }
#projects .project-copy { grid-column:2/-1; max-width:55ch; }
#projects .project-copy h2 { font-size:clamp(1.45rem,2.75vw,2rem); line-height:1.16; margin:.5rem 0 .7rem; }
#main .project-copy h2 a { color:var(--text-primary); }
#main .project-action::after { content:none; }
#main .project-media-image { transform:none; }
.category { font-size:.8rem; font-weight:600; }
.feed-feedback:empty { display:block; height:0; }
.feed-feedback.sr-only { position:absolute; }
.feed-feedback.is-error,.query-summary { padding:14px 0; color:var(--text-secondary); }
.empty-state { padding:clamp(36px,7vw,88px) 16px; border-top:1px solid var(--border); text-align:center; }
.empty-state p { color:var(--text-secondary); margin-top:10px; }
.pagination { display:flex; align-items:center; justify-content:center; gap:20px; margin:26px 0 0; font-size:.9rem; }
.cover { aspect-ratio:2.4; background:var(--bg-card); }
.cover img { height:100%; object-fit:contain; }
#main .article-cta a { color:var(--action-primary-text); background:var(--action-primary-bg); }
.prose ul,.prose ol { padding-inline-start:1.5em; }
.prose img { background:#e2e8f0; }
.prose th,.prose td { min-width:150px; }
.prose table { min-width:max-content; }
.byline { display:flex; flex-wrap:wrap; gap:12px; color:var(--text-muted); font-size:13px; }
#main .related { display:block; margin-top:54px; }
@media(max-width:720px) {
  #main { width:calc(100% - 36px); padding-top:76px; }
  .filter-bar { flex-direction:column; align-items:stretch; gap:10px; }
  .journal-search { width:100%; }
  #projects .project-copy { grid-column:1; }
  .reading-layout { display:block; }
  .prose { font-size:17px; }
  .cover { aspect-ratio:16/10; margin-bottom:24px; }
  .breadcrumbs { margin:20px 0; }
  .lead { font-size:18px; }
}
@media(forced-colors:active) { .journal-search input:focus-visible { outline:2px solid Highlight; outline-offset:-2px; } }

.journal-search input::placeholder,
.journal-search input:focus::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

.journal-proof #main { padding-top:1px; }
.journal-proof .breadcrumbs { margin-block:22px; }
html:has(.journal-proof) { scrollbar-color:var(--scrollbar-thumb) var(--bg-primary); scrollbar-width:thin; }
.reader-languages { display:inline-flex; align-items:center; gap:.75rem; margin:0 0 .8rem; font-weight:600; font-size:.88rem; }
.reader-languages [aria-current] { border-bottom:2px solid var(--accent); }
/* The masthead and the missing-article screen share the journal's open-book hologram. */
.journal-brand { color:var(--accent); }
#main .journal-masthead { text-align:center; padding-top:clamp(20px,3vw,40px); }
.journal-masthead p { margin-inline:auto; }
.journal-hologram {
  position:relative; width:150px; height:104px; margin:0 auto 14px;
  color:var(--accent); isolation:isolate;
}
.journal-hologram::before,.journal-hologram::after {
  content:""; position:absolute; inset:auto 4% 0; height:23%; border-radius:50%;
  border:1px solid color-mix(in srgb,currentColor 28%,transparent);
  background:radial-gradient(ellipse,color-mix(in srgb,currentColor 19%,transparent),transparent 70%);
}
.journal-hologram::after { inset:auto 18% 5%; height:13%; background:none; opacity:.65; }
.holo-book { position:absolute; width:78%; height:59%; top:16%; left:11%; filter:drop-shadow(0 5px 9px color-mix(in srgb,currentColor 20%,transparent)); }
.holo-book i {
  position:absolute; top:0; width:50%; height:100%; box-sizing:border-box;
  border:1.5px solid currentColor; border-radius:4% 18% 4% 5%; transform:skewY(15deg);
  background:linear-gradient(132deg,color-mix(in srgb,currentColor 34%,var(--bg-primary)),color-mix(in srgb,currentColor 9%,var(--bg-primary)));
  box-shadow:0 3px 0 var(--bg-primary),0 4px 0 currentColor,0 6px 0 var(--bg-primary),0 7px 0 currentColor;
  left:0;
}
.holo-book i+i { left:50%; transform:skewY(-15deg); border-radius:18% 4% 5% 4%; }
.holo-book i::before {
  content:""; position:absolute; inset:23% 18% 24%;
  background:repeating-linear-gradient(to bottom,currentColor 0 1.4px,transparent 1.4px 7px);
  opacity:.8; clip-path:polygon(0 0,100% 0,100% 70%,68% 70%,68% 100%,0 100%);
}
.holo-book i+i::before { inset:22% 18% 35%; }
@keyframes book-hover { 50% { transform:translateY(-4px); } }
@media (prefers-reduced-motion:no-preference) { .holo-book { animation:book-hover 5s ease-in-out infinite; } }
#main:has(.journal-fault) { display:grid; align-items:center; min-height:calc(100svh - 1px); padding-bottom:24px; }
.journal-fault { text-align:center; padding-block:clamp(35px,7vh,80px); }
.journal-fault .journal-hologram { width:clamp(180px,24vw,265px); height:auto; aspect-ratio:1.45; margin-bottom:28px; }
.fault-copy h1 { color:var(--text-primary); font-size:clamp(2.2rem,4.6vw,4rem); letter-spacing:-.05em; line-height:1.06; }
.fault-copy p { color:var(--text-secondary); margin:16px auto 0; max-width:42ch; }
.fault-copy .fault-status { margin:0 auto 12px; color:var(--accent); font-weight:650; font-size:.88rem; }
#main .fault-copy .btn { color:var(--action-primary-text); margin-top:25px; min-height:46px; }
#footer { position:relative; isolation:isolate; }
#main .categories a { position:relative; border:0; }
#main .categories a::after {
  content:""; position:absolute; inset:auto 0 0; height:2px; background:var(--accent);
  transform:scaleX(0); transform-origin:left;
}
#main .categories a:is(:hover,:focus-visible,[aria-current]) { color:var(--text-primary); }
#main .categories a:is(:hover,:focus-visible,[aria-current])::after { transform:scaleX(1); }
#main #projects .project-action, #main .reader-back, #main .share a, .copy-code {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  color:var(--text-primary); border:1px solid var(--border); background:var(--bg-card);
  border-radius:10px; font-weight:550; text-decoration:none;
}
#main #projects .project-action { justify-self:start; width:fit-content; padding:0 16px; }
#main #projects .project-action::after { content:none; }
#main :is(.reader-back,.share a):hover, #main #projects .project-action:hover, .copy-code:hover {
  border-color:var(--accent); color:var(--accent); text-decoration:none;
}
#main .project-copy h2 a:hover { color:var(--accent); }
.ui-icon { width:18px; height:18px; flex:none; }
.article-navigation { display:flex; align-items:center; gap:20px; margin:28px 0 40px; }
#main .reader-back { padding:8px 12px; font-size:.87rem; min-height:38px; }
.breadcrumbs { margin:0; gap:0; min-width:0; align-items:center; }
#main .breadcrumbs a { flex:none; color:var(--text-secondary); }
#main .breadcrumbs a:hover { color:var(--accent); }
.breadcrumbs > :not(:first-child)::before { content:"/"; display:inline-block; margin-inline:9px; color:var(--text-muted); font-weight:400; }
.breadcrumbs [aria-current] { color:var(--text-primary); font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.toc {
  position:sticky;
  top:92px;
  flex:0 0 clamp(190px,18vw,244px);
  min-width:0;
  align-self:flex-start;
}
.toc summary {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:40px;
  color:var(--text-primary);
  font-size:16px;
  font-weight:650;
  line-height:1.3;
  list-style:none;
  cursor:pointer;
}
.toc summary::-webkit-details-marker { display:none; }
.toc-toggle {
  display:grid;
  place-items:center;
  width:24px;
  height:24px;
  border-radius:50%;
  background:var(--bg-card);
  color:var(--text-secondary);
}
.toc-toggle::before,.toc-toggle::after {
  content:"";
  grid-area:1 / 1;
  width:10px;
  height:1.5px;
  background:currentColor;
}
.toc-toggle::after { transform:rotate(90deg); }
.toc details[open] .toc-toggle::after { transform:rotate(0); }
.toc summary:hover .toc-toggle { color:var(--accent); }
.toc nav {
  max-height:calc(100dvh - 160px);
  overflow-y:auto;
  padding:2px 0;
  scrollbar-width:thin;
}
.toc ul { list-style:none; margin:0; padding:0; }
.toc li { position:relative; margin:0; padding:0; border-inline-start:1px solid var(--border); }
#main .toc li a {
  display:flex;
  align-items:center;
  min-height:38px;
  padding:7px 8px 7px 15px;
  line-height:1.4;
  overflow-wrap:anywhere;
  color:var(--text-secondary);
  font-size:14px;
  font-weight:500;
}
#main .toc .level-3 { padding-inline-start:29px; font-size:13px; font-weight:400; }
#main .toc .level-4 { padding-inline-start:43px; font-size:13px; font-weight:400; }
#main .toc li a:hover { color:var(--accent); }
#main .toc a[aria-current="location"] { color:var(--text-primary); font-weight:650; }
.toc a[aria-current="location"]::before {
  content:"";
  position:absolute;
  inset-block:7px;
  inset-inline-start:-1px;
  width:3px;
  border-radius:2px;
  background:var(--accent);
}
#main .toc :is(a,summary):focus-visible { outline-offset:-2px; border-radius:4px; }
@media(max-width:720px) {
  .toc { position:static; margin:0 0 30px; padding-block:5px 10px; border-block:1px solid var(--border); }
  .toc summary,#main .toc li a { min-height:44px; }
  .toc nav { max-height:min(50dvh,420px); }
}
@media(prefers-reduced-motion:no-preference) {
  .toc-toggle::after { transition:transform .16s; }
}
#main .prose p a:not(.button), #main .prose li a { box-shadow:inset 0 -1px color-mix(in srgb,var(--accent) 42%,transparent); }
#main .prose p a:hover, #main .prose li a:hover { box-shadow:inset 0 -2px var(--accent); }
.share { gap:8px; align-items:center; }
.share > span { color:var(--text-muted); margin-right:8px; }
#main .share a { min-height:36px; padding:6px 11px; }
.share .ui-icon { width:16px; height:16px; }
.share-telegram::before,.share-vk::before { content:""; width:16px; height:16px; background:currentColor; mask:var(--icon) center / contain no-repeat; }
.share-telegram { --icon:url("landing/assets/social/telegram.svg"); }
.share-vk { --icon:url("landing/assets/social/vk.svg"); }
.prose .code-block { color:var(--text-primary); text-align:left; }
.prose .code-block > div { background:var(--bg-secondary); color:var(--text-primary); font-weight:600; padding:8px 12px 8px 18px; }
#main .copy-code { cursor:pointer; padding:5px 10px; min-width:98px; font-size:12px; min-height:32px; }
.copy-code .ui-icon { width:14px; height:14px; }
.copy-code .icon-check,.copy-code[data-copied] .icon-copy { display:none; }
.copy-code[data-copied] .icon-check { display:block; }
.copy-code[data-copied] { color:var(--accent); border-color:var(--accent); }
.prose pre { tab-size:4; }
.code-block { --keyword:#8e3e99; --literal:#9f451c; --string:#187046; --function:#2256a5; --comment:#5d6a7a; }
[data-theme=dark] .code-block { --keyword:#d5a5ff; --literal:#ffb785; --string:#93dcb3; --function:#90bfff; --comment:#9ca8b8; }
.code-block :is(.hljs-keyword,.hljs-selector-tag,.hljs-meta,.hljs-doctag) { color:var(--keyword); }
.code-block :is(.hljs-string,.hljs-regexp,.hljs-addition,.hljs-attribute,.hljs-template-tag) { color:var(--string); }
.code-block :is(.hljs-number,.hljs-literal,.hljs-symbol,.hljs-variable,.hljs-built_in,.hljs-type) { color:var(--literal); }
.code-block :is(.hljs-title,.hljs-name,.hljs-attr,.hljs-selector-class,.hljs-selector-id,.hljs-property) { color:var(--function); }
.code-block :is(.hljs-comment,.hljs-quote) { color:var(--comment); font-style:italic; }
@media (prefers-reduced-motion:no-preference) {
  #main :is(a,button),.categories a::after { transition:color .16s,border-color .16s,background-color .16s,transform .18s,box-shadow .16s; }
  #main :is(.reader-back,.copy-code,.share a,.article-cta a,.project-action):active { transform:translateY(1px); }
  .copy-code[data-copied] .icon-check { animation:copy-done .2s ease-out; }
}
@keyframes copy-done { from { transform:scale(.65); opacity:.3; } }
@media(max-width:720px) {
  .article-navigation { align-items:flex-start; flex-direction:column; gap:12px; margin:18px 0 26px; }
  .breadcrumbs { max-width:100%; }
  #main .breadcrumbs a { max-width:38%; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
  .share { gap:6px; }
  .journal-masthead .journal-hologram { width:112px; height:78px; }
}
.article-gallery { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr)); align-items:start; gap:16px; margin:32px 0; clear:both; }
.prose .article-gallery figure,.prose .article-gallery figcaption { margin:0; }
.prose .article-gallery img { width:100%; height:auto; }
.prose .article-gallery figcaption { padding:8px 0; }
.prose .image-left,.prose .image-right { width:45%; margin:8px 22px 14px 0; float:left; }
.prose .image-right { float:right; margin:8px 0 14px 22px; }
.prose figure img { height:auto; max-width:100%; }
.prose .image-full img,.prose .image-wide img { width:100%; }
@media(min-width:1050px) { .prose .image-full { width:calc(100% + 48px); margin-inline:-24px; } }
.prose :is(.reader-video,.code-block,.table-scroll,.article-cta,.share,h2,h3,h4) { clear:both; }
.reader-video video { width:100%; aspect-ratio:16/9; object-fit:contain; background:#111; border-radius:12px; }
.reader-video[data-aspect="4:3"] video { aspect-ratio:4/3; }
.reader-video[data-aspect="9:16"] video { aspect-ratio:9/16; max-height:70vh; }
.reader-video figcaption a { display:inline-block; margin-inline:8px; }
@media(max-width:650px) { .prose .image-left,.prose .image-right { float:none; width:100%; max-width:100%; margin:24px 0; } }
