:root { --editorial-tint: #fbf1f2; --editorial-rule: #e4c8cc; }
.header nav[aria-label] { column-gap: clamp(14px, 2.35vw, 34px); }
.header nav a[aria-current] { color: var(--red); text-decoration: underline; }
.archive { padding-block: clamp(45px, 6vw, 87px) var(--rhythm); }
.archive-intro { display: grid; grid-template-columns: 7fr 5fr; gap: var(--gap); align-items: end; padding-bottom: clamp(32px, 5vw, 64px); }
.archive h1, .story h1 { margin: 0; font-size: clamp(3rem, 7.7vw, 7rem); line-height: .99; letter-spacing: -.045em; overflow-wrap: anywhere; }

.archive-intro > p { max-width: 26rem; font-size: clamp(1.125rem, 1.6vw, 1.4rem); }
.archive-tools { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; padding-block: 10px; border-block: 1px solid var(--ink); }
.archive-tools nav, .archive-tools form div, .pagination { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.archive-tools nav a, .pagination a { min-height: 44px; display: inline-flex; align-items: center; font-size: .94rem; text-decoration: none; }
.archive-tools a[aria-current], .archive-tools a:hover, .pagination a[aria-current] { color: var(--red); text-decoration: underline; }
.archive-tools label { position: absolute; clip-path: inset(50%); }
.archive-tools form div { gap: 0; flex-wrap: nowrap; }
.archive-tools input, .archive-tools button { min-height: 44px; padding: 7px 10px; border: 1px solid #888; border-radius: 0; color: var(--ink); background: white; font: inherit; font-size: .94rem; }
.archive-tools input { min-width: 0; }
.archive-tools button { border-left: 0; cursor: pointer; }
.archive-tools :focus-visible { outline: 2px solid var(--red); outline-offset: -3px; }
.editorial { display: grid; grid-template-columns: 7fr 5fr; gap: var(--gap); margin-top: clamp(24px, 3vw, 44px); }
.editorial > div { display: grid; gap: 22px; }
.entry { min-width: 0; padding: 18px 0; border-top: 1px solid var(--line); }
.entry-featured { padding: clamp(20px, 3.4vw, 46px); border-top: 2px solid var(--red); background: var(--editorial-tint); display: flex; flex-direction: column; justify-content: center; }
.entry-meta { display: flex; flex-wrap: wrap; gap: 3px 14px; color: var(--secondary); font-size: .875rem; }
.entry-meta span { color: var(--red); font-weight: 600; }
.entry h2, .entry h3 { font-weight: 500; margin-block: 10px 8px; font-size: clamp(1.35rem, 2.03vw, 2rem); line-height: 1.15; letter-spacing: -.025em; text-wrap: initial; }
.entry-featured h2 { font-size: clamp(2.05rem, 4vw, 4rem); }
.entry h2 a, .entry h3 a { display: inline-block; min-height: 44px; align-content: center; text-decoration: none; }
.entry a:hover { text-decoration: underline; }
.entry p { color: var(--secondary); font-size: 1rem; }
.entry-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.archive .entry-list, .empty-result, .pagination { margin-top: clamp(28px, 4vw, 55px); }
.empty-result p { margin-top: 14px; }
.latest { margin-bottom: var(--section-break); padding: clamp(20px, 3vw, 42px); border-top: 2px solid var(--red); background: var(--editorial-tint); }
.latest .entry { border-color: var(--editorial-rule); }
.latest > div:first-child { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: end; margin-bottom: 20px; }
.latest h2 { font-size: clamp(1.85rem, 3.25vw, 3.5rem); text-wrap: initial; }
.latest .entry p { display: none; }
.story-wrap { padding-bottom: var(--rhythm); }
.crumbs { display: flex; flex-wrap: wrap; gap: 0 14px; align-items: center; padding-block: 10px; color: var(--secondary); font-size: .875rem; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.crumbs a::after { content: "/"; margin-left: 14px; color: #888; }
.story { width: min(100%, 740px); margin-inline: auto; }
.story header { padding-block: clamp(30px, 4vw, 60px) 28px; border-bottom: 1px solid var(--line); }
.story h1 { margin-top: 16px; font-size: clamp(2.5rem, 5.7vw, 5.5rem); }
.story-lead { margin-top: 21px; font-size: clamp(1.22rem, 1.9vw, 1.65rem); }
.byline { margin-top: 13px; font-size: .94rem; color: var(--secondary); }
.byline a, .source-note a, .prose a { color: var(--red); }
.prose { padding-top: 25px; font-size: clamp(1.125rem, 1.5vw, 1.25rem); line-height: 1.7; overflow-wrap: anywhere; }
.prose p + p { margin-top: .8em; }
.source-note { padding: 18px 0; margin-top: 28px; border-block: 1px solid var(--line); font-size: 1rem; color: var(--secondary); }
.source-note p + p { margin-top: 8px; }
.author { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 20px; align-items: center; background: var(--gray); padding: 22px; margin-top: 27px; }
.author img { width: 100%; height: 128px; object-fit: cover; object-position: center 27%; }
.author h2, .related > h2 { font-size: clamp(1.65rem, 2.7vw, 2.6rem); }
.author h2 { letter-spacing: -.025em; }
.author p { margin-block: 5px 11px; }
.author .textlink { margin-inline-end: 20px; vertical-align: middle; }
.author .action { max-width: 100%; vertical-align: middle; }
.author .action:focus-visible { outline-color: var(--red); }
.related { margin-top: var(--rhythm); }
.related .entry-list { margin-top: 16px; }
.back { margin-top: 20px; }
@media (max-width: 720px) {
  .archive-intro, .editorial, .entry-list { grid-template-columns: minmax(0, 1fr); }
  .editorial > div, .entry-list { gap: 8px; }
  .archive-tools form, .archive-tools input { flex: 1; }
  .archive-tools form { min-width: min(100%, 275px); }
  .author { grid-template-columns: 62px minmax(0, 1fr); align-items: start; gap: 12px; padding: 14px; }
  .author img { height: 76px; }
  .author .textlink, .author .action { display: flex; width: fit-content; margin-inline-end: 0; }
  .author .action { margin-top: 7px; }
  .contact-main h2 { max-width: 17ch; text-wrap: balance; }
}
@media (max-width: 360px) {
  .header nav[aria-label] { column-gap: 7px; }
  .header nav a { font-size: .75rem; }
}

.home-preview .logo-motion { position: relative; }
.home-preview .logo-pause { display: none; }
.consent-preview { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 8px; font-size: .875rem; color: #e2e2e2; cursor: pointer; }
.consent-preview input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--red); }
.consent-preview input:focus-visible { outline: 2px solid white; outline-offset: 3px; }
.home-preview .steps li { outline-offset: 5px; }
.home-preview .steps li p { margin-top: 8px; }
@keyframes appear-article { from { opacity: .25; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes logo-loop { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: no-preference) {
  html:has(.home-preview) { scroll-behavior: smooth; }
  .home-preview .reveal { opacity: 0; transform: translateY(12px); transition: opacity .48s ease, transform .48s ease; }
  .home-preview .reveal.is-visible { opacity: 1; transform: none; }
  .home-preview .facts.is-visible div:nth-child(2) { animation: appear-article .5s .09s both; }
  .home-preview .facts.is-visible div:nth-child(3) { animation: appear-article .5s .18s both; }
  .home-preview details[open] .answer { animation: appear-article .27s ease both; }
  .home-preview .steps li, .home-preview .education li, .home-preview .articles li, .home-preview .latest .entry {
    transition: transform .23s ease, background-color .23s ease;
  }
  .home-preview .steps li:is(:hover, :focus-visible) { transform: translateY(-6px); background: var(--white); }
  .home-preview .steps li:is(:hover, :focus-visible) .step-no { color: #9e1f2c; }
  .home-preview .education li:is(:hover, :focus-visible),
  .home-preview .articles li:is(:hover, :focus-within),
  .home-preview .latest .entry:is(:hover, :focus-within) { transform: scale(1.018); }
  .home-preview .latest .entry:is(:hover, :focus-within) { background-color: #f4f7f2; }
  .home-preview.motion-ready .mastheads { display: flex; gap: 0; overflow: hidden; }
  .home-preview.motion-ready .masthead-group { display: flex; justify-content: space-around; align-items: center; gap: 26px; flex: 0 0 min(100%, 1320px); padding-inline: 16px; animation: logo-loop 32s linear infinite; }
  .home-preview .masthead-group li { flex: 0 1 170px; }
  .home-preview .mastheads:is(:hover, .is-paused) .masthead-group { animation-play-state: paused; }
  .home-preview.motion-ready .logo-pause { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; padding: 0; color: var(--secondary); background: transparent; border: 0; font: inherit; font-size: .875rem; text-decoration: underline; cursor: pointer; }
  .home-preview .logo-pause[aria-pressed="true"] { color: var(--red); }
  .home-preview .logo-pause:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
}
.home-preview:not(.motion-ready) .masthead-group:not([aria-hidden]) { display: contents; }
.home-preview:not(.motion-ready) .masthead-group[aria-hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
  .home-preview.motion-ready .masthead-group:not([aria-hidden]) { display: contents; }
  .home-preview.motion-ready .masthead-group[aria-hidden] { display: none; }
}
@media (max-width: 680px) {
  .home-preview.motion-ready .masthead-group { flex-basis: 200%; }
}

.prose h2 { margin: 1.2em 0 .45em; font-size: clamp(1.55rem, 2.55vw, 2.35rem); text-wrap: initial; }
.prose ul, .prose ol { padding-left: 1.3em; margin: .6em 0 1em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .45em; }
.prose blockquote { margin: 1em 0; padding-left: 1em; border-left: 2px solid var(--red); }
.toc a { display: inline-flex; align-items: center; min-height: 44px; }

.archive-intro, .story-wrap { position: relative; isolation: isolate; }
.archive-intro::before, .story-wrap::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  background: center / contain no-repeat;
}
.archive-intro::before {
  right: 36%;
  top: 0;
  width: min(32%, 380px);
  aspect-ratio: 1.55;
  background-image: url("assets/cortical-pattern.webp");
  mask-image: linear-gradient(to right, transparent 12%, #000 72%);
  opacity: .61;
}
.story-wrap::before {
  top: 100px;
  right: 0;
  width: clamp(0px, calc((100% - 740px) / 2), 260px);
  aspect-ratio: 2.27;
  background-image: url("assets/neuron-lines.webp");
  opacity: .65;
}
@media (max-width: 720px) {
  .archive-intro::before { top: 0; right: 0; width: 61%; opacity: .42; }
  .story-wrap::before { top: 55px; width: min(55%, 200px); opacity: .3; }
}

.story-image { display: block; width: 100%; height: auto; margin-top: 24px; }

.telegram-prose > * + * { margin-top: .85em; }
.telegram-prose > h2 { margin-top: 1.45em; }
.telegram-prose > h2 + p { margin-top: .4em; }
.telegram-prose > :first-child { margin-top: 0; }
