@import url('https://fonts.googleapis.com/css2?family=Golos+Text:wght@400;450;500;550;600;650;700&family=PT+Serif:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  color-scheme: only light;
  --ink: #242722;
  --ink-soft: #62665f;
  --ink-mute: #787b73;
  --rule: #dedfd5;
  --surface: #fafaf5;
  --raised: #efefe6;
  --accent: #9b3e30;
  --serif: 'PT Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-family: var(--sans);
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--surface); color: var(--ink); -webkit-font-smoothing: antialiased; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 120px; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 2px; }
::selection { color: var(--ink); background: #e8dfc8; }
.app { display: flex; flex-direction: column; min-height: 100dvh; }
.app-header { border-bottom: 1px solid var(--rule); }
.top-bar { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px max(22px, calc((100vw - 1040px) / 2)); background: #252c27; color: #f0efe6; font-size: 10px; letter-spacing: .07em; }
.network-mark { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.network-mark img { display: block; border-radius: 50%; object-fit: cover; }
.network-mark img, .masthead img { color-scheme: only light; filter: none !important; mix-blend-mode: normal !important; forced-color-adjust: none; }
.top-bar-stats { display: flex; align-items: center; gap: 16px; }
.stat { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; letter-spacing: 0; white-space: nowrap; }
.stat-icon { display: block; width: 16px; height: 16px; flex-shrink: 0; }
.stat-value { color: #ed9a8b; font-weight: 650; font-variant-numeric: tabular-nums; }
.stat-label { opacity: .8; }
.masthead { display: flex; width: fit-content; align-items: center; justify-content: center; gap: 14px; margin: 0 auto; padding: 25px 20px 27px; text-decoration: none; }
.masthead img { object-fit: cover; border-radius: 50%; }
.masthead > span { font: 700 clamp(23px, 4vw, 31px)/1.2 var(--serif); letter-spacing: -.055em; }
.masthead em { color: var(--accent); font-style: normal; }
.content { flex: 1; width: 100%; max-width: 736px; margin: 0 auto; padding: 42px 32px 72px; overflow-wrap: break-word; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--ink); }
.section-heading h1 { margin: 0; font: 550 12px/1.5 var(--sans); letter-spacing: .09em; text-transform: uppercase; }
.section-heading > span { font: italic 12px/1.5 var(--serif); color: var(--ink-mute); }
.pub-list { list-style: none; padding: 0; margin: 0; }
.pub-item { padding: 36px 0 32px; border-bottom: 1px solid var(--rule); animation: reveal .5s ease both; }
.article-title { margin: 0 0 16px; font: 700 clamp(26px, 4.8vw, 37px)/1.24 var(--serif); letter-spacing: -.037em; text-wrap: pretty; overflow-wrap: anywhere; }
.article-title a { text-decoration: none; transition: color .2s ease; }
.article-page > .article-title { font-size: clamp(32px, 5.5vw, 46px); line-height: 1.18; margin-bottom: 22px; }
.article-source { margin-bottom: 23px; font: 450 12px/1.75 var(--sans); color: var(--ink-soft); }
.article-source p { margin: 0; }
.article-source .source-position { color: var(--ink-mute); font-size: 11px; margin-top: 4px; }
.article-added { display: block; margin-top: 20px; font: 400 10px/1.6 var(--sans); letter-spacing: .035em; color: var(--ink-mute); }
.article-media, .article-body figure { margin: 24px 0 0; }
.article-media img, .article-media video, .article-body img, .article-body video { display: block; width: 100%; max-width: 100%; height: auto; border-radius: 3px; background: var(--raised); }
.article-media video, .article-body video { max-height: 78dvh; }
.cover-link { display: block; overflow: hidden; border-radius: 3px; }
.cover-link img { transition: transform .65s cubic-bezier(.2,.7,.3,1), filter .4s ease; }
.article-media figcaption, .article-body figcaption { margin-top: 10px; padding-left: 12px; border-left: 1px solid var(--rule); font: 400 11px/1.75 var(--sans); color: var(--ink-mute); }
figcaption p { margin: 0; }
figcaption a { text-underline-offset: 3px; }
.account-portrait { max-width: 240px; }
.account-portrait img { aspect-ratio: 1; object-fit: cover; }
.back-link { display: inline-block; color: var(--ink-soft); text-decoration: none; font: 450 11px/1.6 var(--sans); transition: color .2s ease; }
.article-page > .back-link { margin-bottom: 32px; }
.article-page { animation: reveal .45s ease both; }
.article-body { border-top: 1px solid var(--rule); margin-top: 28px; padding-top: 28px; font: 400 clamp(18px, 2.5vw, 20px)/1.85 var(--serif); letter-spacing: -.014em; }
.article-body > :first-child { margin-top: 0; }
.article-body > :last-child { margin-bottom: 0; }
.article-body p { margin: 0 0 1.35em; white-space: pre-line; }
.article-body h2, .article-body h3, .article-body h4 { margin: 1.9em 0 .7em; font-family: var(--serif); font-weight: 700; letter-spacing: -.025em; line-height: 1.35; text-wrap: pretty; }
.article-body h2 { font-size: 1.35em; }
.article-body h3, .article-body h4 { font-size: 1.15em; }
.article-body b, .article-body strong { font-weight: 700; }
.article-body a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 4px; transition: color .2s ease; }
.article-body blockquote { margin: 1.7em 0; padding: 3px 0 3px 22px; border-left: 2px solid var(--accent); color: var(--ink-soft); font-style: italic; }
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body ul, .article-body ol { padding-left: 1.4em; margin: 0 0 1.4em; }
.article-body li { padding-left: .3em; margin-bottom: .4em; }
.article-body figure { margin: 1.8em 0; }
.article-body pre { overflow-x: auto; padding: 16px; background: var(--raised); border-radius: 3px; font-size: .75em; }
.article-body hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
.article-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; border-top: 1px solid var(--rule); margin-top: 40px; padding-top: 24px; }
.other-articles-link { text-decoration-line: underline; text-decoration-style: dashed; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.load-more-wrap { padding-top: 32px; text-align: center; }
.load-more { display: inline-flex; min-height: 48px; min-width: 210px; justify-content: center; align-items: center; gap: 34px; padding: 13px 24px; border: 1px solid #cdd0c3; border-radius: 3px; background: transparent; color: var(--ink); font-size: 12px; cursor: pointer; transition: background .25s ease, border-color .25s ease; }
.load-more:disabled { cursor: wait; color: var(--ink-soft); }
.loader { display: inline-flex; align-items: center; gap: 12px; font: 400 12px/1.5 var(--sans); color: var(--ink-soft); }
.spinner { display: inline-block; width: 18px; height: 18px; flex: 0 0 auto; border: 1.5px solid var(--rule); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.state-wrap { min-height: 40dvh; display: flex; align-items: center; justify-content: center; }
.error-state { flex-direction: column; gap: 16px; text-align: center; color: var(--ink-soft); font-size: 14px; line-height: 1.7; }
.reader-gate { max-width: 430px; margin: 24px auto 48px; text-align: center; animation: reveal .45s ease both; }
.reader-gate-mark { display: block; margin-bottom: 22px; font-size: 40px; }
.reader-gate h1 { margin: 0 0 18px; font: 700 clamp(28px, 5vw, 36px)/1.25 var(--serif); letter-spacing: -.03em; }
.reader-gate p { margin: 0 0 18px; font: 400 16px/1.75 var(--serif); color: var(--ink-soft); }
.reader-gate .reader-gate-note { font: 400 12px/1.8 var(--sans); color: var(--ink-mute); }
.reader-gate-button { display: block; width: fit-content; margin: 28px auto 16px; padding: 15px 24px; border: 1px solid var(--ink); border-radius: 3px; background: var(--ink); color: var(--surface); text-decoration: none; font: 450 13px/1.5 var(--sans); transition: background .2s ease; }
.text-button { padding: 8px 0; border: 0; border-bottom: 1px solid var(--rule); background: none; cursor: pointer; color: var(--accent); font-size: 12px; }
.more-error { font-size: 12px; color: var(--accent); line-height: 1.6; }
.empty-state { padding: 64px 0; text-align: center; }
.empty-state p { font: 400 24px/1.4 var(--serif); }
.empty-state span { font-size: 12px; color: var(--ink-mute); }
.feed-end { text-align: center; margin: 32px 0 0; font: italic 12px/1.5 var(--serif); color: var(--ink-mute); }
.site-footer { display: flex; width: calc(100% - 64px); max-width: 672px; margin: 0 auto; justify-content: space-between; gap: 20px; padding: 20px 0 calc(24px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--rule); color: var(--ink-mute); font: 400 10px/1.5 var(--sans); }
.site-footer span:first-child { color: var(--ink-soft); font-weight: 500; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (hover: hover) {
  .article-title a:hover, .back-link:hover { color: var(--accent); }
  .cover-link:hover img { transform: scale(1.015); filter: brightness(1.025); }
  .load-more:hover:enabled { background: var(--raised); border-color: #b2b6a7; }
}
@media (max-width: 480px) {
  .top-bar { padding: 8px 16px; gap: 12px; }
  .top-bar-stats { gap: 10px; }
  .stat { gap: 4px; font-size: 10px; }
  .stat-icon { width: 14px; height: 14px; }
  .masthead { gap: 11px; padding: 22px 16px; }
  .masthead img { width: 40px; height: 40px; }
  .content { padding: 30px 22px 52px; }
  .section-heading > span { font-size: 10px; }
  .section-heading h1 { font-size: 10px; }
  .pub-item { padding: 28px 0; }
  .article-source { font-size: 11px; margin-bottom: 18px; }
  .article-body { line-height: 1.8; }
  .account-portrait { max-width: 190px; }
  .site-footer { width: calc(100% - 44px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
