/* A self-contained reading space. No town stylesheet or pixel font is loaded. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --text-color: #262626;
  --muted: #6e6e69;
  --soft: #74746f;
  --line: #e9e9e5;
  --surface: #f5f5f2;
  --blue: #4d6b76;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: Georgia, "Times New Roman", "Songti SC", serif;
  --font-pixel: var(--font-sans);
  --panel: var(--bg);
  --journal-width: 700px;
  --journal-shadow: 0 12px 40px rgb(0 0 0 / 8%), 0 1px 3px rgb(0 0 0 / 4%);
  scroll-behavior: smooth;
  scroll-padding-top: 40px;
  -webkit-text-size-adjust: 100%;
}
html[data-scheme='dark'] {
  color-scheme: dark;
  --bg: #0a0a0a;
  --text-color: #e7e5df;
  --muted: #aaa9a2;
  --soft: #999990;
  --line: #30302c;
  --surface: #222220;
  --blue: #a6c1cc;
  --journal-shadow: 0 12px 40px rgb(0 0 0 / 26%);
}
@media (prefers-color-scheme: dark) {
  html:not([data-scheme='light']) { color-scheme: dark; --bg: #0a0a0a; --text-color: #e7e5df; --muted: #aaa9a2; --soft: #999990; --line: #30302c; --surface: #222220; --blue: #a6c1cc; --journal-shadow: 0 12px 40px rgb(0 0 0 / 26%); }
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text-color); font: 400 16px/1.75 var(--font-sans); -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
a { color: inherit; text-decoration: none; text-underline-offset: 4px; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button, input, textarea, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 5px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--blue) 22%, transparent); }
.visually-hidden, .journal-year-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; z-index: 30; left: 16px; top: 16px; padding: 8px 16px; border-radius: 8px; background: var(--text-color); color: var(--bg); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.journal-header, .journal-main, .journal-footer { width: min(var(--journal-width), calc(100% - 64px)); margin-inline: auto; }
.journal-header { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding-top: max(34px, env(safe-area-inset-top)); }
.journal-brand { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; }
.journal-brand img { display: block; width: 38px; height: 38px; border-radius: 50%; object-fit: cover; filter: saturate(.7); }
.journal-tools { display: flex; align-items: center; gap: 8px; }
.journal-icon-button { display: grid; place-items: center; width: 38px; height: 38px; padding: 10px; border: 0; border-radius: 9px; background: transparent; color: var(--soft); transition: color .18s ease, background .18s ease; }
.journal-icon-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.journal-icon-button:hover, .journal-icon-button[aria-expanded='true'] { color: var(--text-color); background: var(--surface); }
.journal-appearance { position: relative; }
.journal-appearance-options { position: absolute; z-index: 20; top: calc(100% + 8px); right: 0; min-width: 145px; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); box-shadow: var(--journal-shadow); }
.journal-appearance-options button { display: flex; justify-content: space-between; width: 100%; padding: 8px 11px; border: 0; border-radius: 7px; background: transparent; font-size: 13px; text-align: left; }
.journal-appearance-options button:hover { background: var(--surface); }
.journal-appearance-options span { opacity: 0; }
.journal-appearance-options [aria-pressed='true'] { background: var(--surface); }
.journal-appearance-options [aria-pressed='true'] span { opacity: 1; }
.journal-intro { margin: 76px 0 86px; }
.journal-intro h1 { margin: 0; font: 400 48px/1.2 var(--font-serif); letter-spacing: -1.7px; }
.journal-intro h1 span { display: inline-block; margin-left: 14px; color: var(--soft); font: italic 400 19px/1.4 var(--font-serif); letter-spacing: 0; }
.journal-intro > p { margin: 18px 0 21px; color: var(--muted); font-size: 15px; }
.journal-intro-links { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 24px; color: var(--muted); font-size: 13px; }
.journal-intro-links a { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; }
.journal-intro-links svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
.journal-intro-links a:hover, .journal-footer a:hover, .journal-back:hover, .article-return:hover { color: var(--text-color); }
.journal-archive { position: relative; }
.journal-years { position: absolute; top: 0; left: -120px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; width: 90px; }
.journal-years a { display: inline-flex; align-items: center; gap: 10px; color: var(--soft); font-size: 12px; font-variant-numeric: tabular-nums; }
.journal-years a::before { content: ''; width: 16px; height: 1px; background: var(--line); transition: width .18s ease, background .18s ease; }
.journal-years a:hover, .journal-years a:focus-visible { color: var(--text-color); }
.journal-years a:hover::before { width: 23px; background: var(--muted); }
.journal-year { scroll-margin-top: 60px; }
.journal-year + .journal-year { margin-top: 52px; }
.journal-entry { position: relative; isolation: isolate; margin: 0 0 38px; }
.journal-entry::before { content: ''; position: absolute; z-index: -1; inset: -14px -16px; border-radius: 12px; background: var(--surface); opacity: 0; transition: opacity .22s ease; pointer-events: none; }
.journal-entry-preview { display: none; }
.journal-entry:focus-within::before { opacity: 1; }
.journal-entry-link { display: block; border-radius: 6px; }
.journal-entry h3 { margin: 0 0 9px; font-size: 18px; line-height: 1.6; font-weight: 600; letter-spacing: -.18px; transition: color .18s ease; }
.journal-entry-link:hover h3 { color: var(--text-color); }
.journal-entry-link p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.9; letter-spacing: .01em; }
.journal-entry-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 10px; color: var(--soft); font-size: 12px; line-height: 1.7; }
.journal-entry-meta time { margin-right: 5px; font-variant-numeric: tabular-nums; }
.journal-tag { display: inline-block; padding: 1px 8px; border-radius: 20px; background: var(--surface); color: var(--muted); font-size: 11px; line-height: 1.7; transition: color .18s ease, background .18s ease; }
.journal-entry:is(:hover,:focus-within) .journal-tag { background: var(--bg); }
.journal-tag:hover { color: var(--text-color); }
.journal-statistics { display: flex; flex-wrap: wrap; gap: 5px 0; padding-top: 22px; margin-top: 44px; border-top: 1px solid var(--line); color: var(--soft); font-size: 12px; font-variant-numeric: tabular-nums; }
.journal-statistics span + span::before { content: '·'; margin-inline: 10px; }
.journal-footer { padding: 62px 0 max(36px, env(safe-area-inset-bottom)); color: var(--soft); font-size: 12px; }
.journal-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.journal-footer p { margin: 10px 0 0; }
.journal-footer p span { margin-inline: 6px; }
.journal-empty { color: var(--muted); }

@media (hover: hover) and (pointer: fine) {
  .journal-entry:hover::before { opacity: 1; }
  .post-list-page:has(.journal-entry:is(:hover,:focus-within)) .journal-entry:not(:hover):not(:focus-within) h3 { color: var(--muted); }
  .post-list-page:has(.journal-entry:hover) .journal-entry:not(:hover)::before { opacity: 0; }
  .post-list-page:has(.journal-entry:hover) .journal-entry:not(:hover) h3 { color: var(--muted); }
}
@media (min-width: 960px) and (hover: hover) and (pointer: fine) {
  .journal-page:has(.writing-journal) { --journal-width: 980px; }
  .writing-journal { width: calc(100% - 280px); }
  .journal-entry-preview { display: block; position: absolute; z-index: 2; left: calc(100% + 32px); top: 50%; width: 248px; margin: 0; opacity: 0; visibility: hidden; transform: translate(8px, -48%) scale(.97); pointer-events: none; transition: opacity .24s ease, transform .32s cubic-bezier(.2,.7,.2,1), visibility .24s; }
  .journal-entry-preview::before { content: ''; position: absolute; z-index: -1; inset: 22px -4px -12px; border-radius: 18px; background: var(--surface); filter: blur(20px); }
  .journal-entry-preview img { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; border-radius: 12px; box-shadow: 0 16px 35px rgb(0 0 0 / 14%); }
  .journal-entry:is(:hover,:focus-within) .journal-entry-preview.is-ready { opacity: 1; visibility: visible; transform: translate(0, -50%) scale(1); }
  .post-list-page:has(.journal-entry:hover) .journal-entry:not(:hover) .journal-entry-preview.is-ready { opacity: 0; visibility: hidden; transform: translate(8px, -48%) scale(.97); }
}
@media (min-width: 1041px) and (max-width: 1280px) and (hover: hover) and (pointer: fine) {
  .journal-page:has(.writing-journal) .journal-years { position: static; flex-direction: row; gap: 24px; width: auto; margin-bottom: 30px; }
}

/* Article typography is intentionally separate from the town's card UI. */
.journal-article { --journal-width: 672px; max-width: 672px; margin: 68px auto 0; }
.article-header { margin-bottom: 42px; }
.journal-back { display: inline-block; margin-bottom: 32px; color: var(--soft); font-size: 13px; }
.article-header h1 { margin: 0 0 16px; font-size: 34px; font-weight: 600; line-height: 1.45; letter-spacing: -.7px; text-wrap: balance; }
.post-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; color: var(--soft); font-size: 12px; line-height: 1.7; }
.post-meta > * + *::before { content: '·'; padding-right: 10px; }
.article-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0 0; padding: 0; list-style: none; }
.article-content { font-size: 17px; line-height: 1.95; letter-spacing: .012em; overflow-wrap: anywhere; }
.article-content > :first-child { margin-top: 0; }
.article-content p { margin: 0 0 1.55em; }
.article-content h2, .article-content h3, .article-content h4 { margin: 2.5em 0 .8em; line-height: 1.5; font-weight: 600; letter-spacing: -.02em; scroll-margin-top: 32px; }
.article-content h2 { font-size: 25px; }
.article-content h3 { font-size: 21px; }
.article-content a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--text-color) 30%, transparent); text-decoration-thickness: 1px; }
.article-content a:hover { color: var(--blue); text-decoration-color: currentColor; }
.article-content img, .article-content video { display: block; max-width: 100%; height: auto; margin: 28px auto; border-radius: 12px; }
.article-content iframe { max-width: 100%; border-radius: 12px; }
.article-content figure { margin: 32px 0; }
.article-content figcaption { margin-top: 10px; color: var(--soft); font-size: 12px; text-align: center; }
.article-content blockquote { margin: 32px 0; padding: 0 0 0 22px; border-left: 2px solid var(--line); color: var(--muted); }
.article-content hr { margin: 42px auto; width: 60px; border: 0; border-top: 1px solid var(--line); }
.article-content ul, .article-content ol { padding-left: 1.5em; }
.article-content li { margin-block: .4em; }
.article-content pre { position: relative; padding: 24px 20px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font: 13px/1.8 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; }
.article-content code { font: .85em/1.8 ui-monospace, SFMono-Regular, Consolas, monospace; }
.article-content :not(pre) > code { padding: 2px 5px; border-radius: 4px; background: var(--surface); }
.article-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 14px; }
.article-content th, .article-content td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.code-copy-button { position: absolute; top: 6px; right: 8px; padding: 3px 8px; border: 0; border-radius: 5px; background: var(--surface); color: var(--muted); font-size: 11px; }
.reading-progress-bar { position: fixed; z-index: 25; top: 0; left: 0; width: 0; height: 2px; background: var(--blue); opacity: .65; }
.article-end { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 38px; padding-top: 18px; border-top: 1px solid var(--line); }
.article-return { color: var(--muted); font-size: 13px; }
.article-share-copy { position: relative; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--soft); transition: background .18s ease, color .18s ease, transform .16s ease; }
.article-share-copy:hover, .article-share-copy:focus-visible { background: var(--surface); color: var(--text-color); }
.article-share-copy:active { transform: scale(.92); }
.article-share-icon { display: block; width: 22px; height: 22px; overflow: visible; }
.article-share-link, .article-share-success { transform-origin: 12px 12px; transition: opacity .18s ease, transform .22s ease; }
.article-share-success { opacity: 0; }
.article-share-ring { stroke-width: 1; opacity: .4; }
.article-share-ring, .article-share-tick { stroke-dasharray: 1; stroke-dashoffset: 0; }
.article-share-copy[data-state='copied'] { color: var(--blue); background: var(--surface); }
.article-share-copy[data-state='copied'] .article-share-link { opacity: 0; transform: scale(.6); }
.article-share-copy[data-state='copied'] .article-share-success { opacity: 1; animation: journal-copy-settle .45s cubic-bezier(.2,.8,.2,1) both; }
.article-share-copy[data-state='copied'] .article-share-ring { animation: journal-copy-stroke .3s ease .06s both; }
.article-share-copy[data-state='copied'] .article-share-tick { animation: journal-copy-stroke .25s ease .22s both; }
.article-share-tooltip { position: absolute; bottom: calc(100% + 7px); left: 50%; padding: 5px 8px; width: max-content; border-radius: 6px; background: var(--text-color); color: var(--bg); font-size: 11px; line-height: 1.5; pointer-events: none; opacity: 0; transform: translate(-50%,4px); transition: opacity .15s ease, transform .18s ease; }
.article-share-copy:is(:hover,:focus-visible,[data-state]) .article-share-tooltip { opacity: 1; transform: translate(-50%,0); }
.share-copy-fallback { position: fixed; top: 0; left: -9999px; font-size: 16px; }
@keyframes journal-copy-stroke { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes journal-copy-settle { 0% { transform: scale(.75); } 65% { transform: scale(1.08); } 100% { transform: scale(1); } }
.journal-page .article-comments { --comment-step: inset(0 round 10px); margin-top: 58px; }
.journal-page .comments-heading h2 { font: 600 20px/1.5 var(--font-sans); }
.journal-page .comments-heading .eyebrow { font-size: 10px; }
.journal-page .comments-intro { font-size: 13px; }
.journal-page .comment-submit, .journal-page .comment-like { border-radius: 10px; font-size: 13px; }
.journal-page .article-comments .comment-text { font-size: 15px; }
.journal-page .comment-form { box-shadow: 0 4px 20px rgb(0 0 0 / 3%); }

/* Lightweight, local search; the input remains at 16px on iOS. */
.journal-search { position: fixed; width: min(560px, calc(100% - 32px)); max-height: min(75dvh, 650px); margin: min(18vh, 130px) auto auto; padding: 20px; overflow-y: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); color: var(--text-color); box-shadow: var(--journal-shadow); }
.journal-search::backdrop { background: rgb(0 0 0 / 22%); backdrop-filter: blur(4px); }
.journal-search-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.journal-search-heading h2 { margin: 0; font-size: 15px; font-weight: 500; }
.journal-search input { display: block; width: 100%; margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); font-size: 16px; }
.journal-search input:focus-visible { outline-offset: 2px; }
.journal-search-status { margin: 15px 0 6px; color: var(--muted); font-size: 12px; }
.journal-search-results { margin: 0; padding: 0; list-style: none; }
.journal-search-results a { display: flex; flex-direction: column; gap: 5px; padding: 12px 10px; border-radius: 8px; }
.journal-search-results a:hover, .journal-search-results a:focus-visible { background: var(--surface); }
.journal-search-results strong { font-size: 14px; font-weight: 500; }
.journal-search-results span { color: var(--muted); font-size: 11px; }
@media (max-width: 1040px) {
  .journal-years { position: static; flex-direction: row; gap: 24px; width: auto; margin-bottom: 30px; }
  .journal-years a { font-size: 12px; }
}
@media (max-width: 600px) {
  :root { scroll-padding-top: 24px; }
  .journal-header, .journal-main, .journal-footer { width: calc(100% - 48px); }
  .journal-header { padding-top: max(24px, env(safe-area-inset-top)); }
  .journal-intro { margin: 60px 0 56px; }
  .journal-intro h1 { font-size: 41px; }
  .journal-intro h1 span { margin-left: 10px; font-size: 16px; }
  .journal-intro > p { max-width: 280px; margin: 16px 0; font-size: 14px; }
  .journal-intro-links { gap: 10px 20px; font-size: 12px; }
  .journal-years { margin-bottom: 28px; gap: 20px; }
  .journal-year + .journal-year { margin-top: 40px; }
  .journal-entry { margin-bottom: 34px; }
  .journal-entry h3 { font-size: 17px; }
  .journal-entry-link p { font-size: 14px; line-height: 1.85; }
  .journal-statistics { margin-top: 30px; font-size: 11px; }
  .journal-footer { padding-top: 48px; }
  .journal-article { margin-top: 48px; }
  .journal-back { margin-bottom: 28px; }
  .article-header { margin-bottom: 32px; }
  .article-header h1 { font-size: 28px; line-height: 1.5; letter-spacing: -.5px; }
  .post-meta { font-size: 11px; gap: 5px 8px; }
  .post-meta > * + *::before { padding-right: 8px; }
  .article-content { font-size: 16px; line-height: 1.95; }
  .article-content p { margin-bottom: 1.5em; }
  .article-content h2 { font-size: 22px; }
  .article-content h3 { font-size: 19px; }
  .journal-page .article-comments { padding: 24px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; }
  .journal-page .comments-heading h2 { font-size: 20px; }
  .journal-page .comments-heading-actions { margin-left: 0; }
  .journal-search { margin-top: max(24px, env(safe-area-inset-top)); max-height: 80dvh; padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Tag archives share the article rows while keeping a simple topic heading. */
.journal-tag-intro .journal-back { margin-bottom: 20px; }
.journal-tag-intro h1 { font-family: var(--font-sans); font-size: 40px; font-weight: 650; letter-spacing: -1px; }
.journal-tag-intro h1 .journal-tag-hash { margin: 0; color: var(--blue); font: inherit; }
.journal-tag-intro > p { font-size: 13px; }
.journal-tag[aria-current='page'] { color: var(--text-color); }
.journal-tag-index { display: grid; gap: 10px; }
.journal-tag-index > a { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; margin-inline: -20px; border-radius: 12px; transition: background .2s ease; }
.journal-tag-index > a:hover, .journal-tag-index > a:focus-visible { background: var(--surface); }
.journal-tag-index > a > span:first-child { font-size: 18px; font-weight: 600; }
.journal-tag-index > a > span:last-child { color: var(--soft); font-size: 12px; white-space: nowrap; }
.journal-tag-hash { color: var(--blue); }
.journal-tag-index > a > span:last-child span { margin-left: 10px; }

/* Writing volume, grouped by the reader's local calendar. */
.journal-history { --history-bar: #3184c4; --history-active: #2876b1; position: relative; margin-top: 62px; }
html[data-scheme='dark'] .journal-history { --history-bar: #69b1eb; --history-active: #91cbfa; }
@media (prefers-color-scheme:dark) { html:not([data-scheme='light']) .journal-history { --history-bar: #69b1eb; --history-active: #91cbfa; } }
.journal-history .journal-statistics { margin: 0 0 12px; padding: 0; border: 0; }
.journal-history .journal-statistics span:first-child { color: var(--text-color); }
.history-track { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; scrollbar-color: var(--line) transparent; overscroll-behavior-x: contain; padding: 4px 2px 9px; }
.history-bars { display: grid; grid-template-columns: repeat(var(--history-months), minmax(0,1fr)); gap: 4px; min-width: calc(var(--history-months) * 13px); padding-bottom: 24px; }
.history-month { position: relative; min-width: 0; height: 64px; }
.history-month-button, .history-month-empty { display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 64px; }
.history-month-button { position: relative; padding: 0; border: 0; border-radius: 3px; background: transparent; }
.history-month-fill { display: block; width: 100%; max-width: 11px; min-height: 7px; border-radius: 2px; background: var(--history-bar); transition: background .18s ease, box-shadow .18s ease, transform .2s ease; transform-origin: bottom; }
.history-month-button:hover .history-month-fill, .history-month-button[aria-expanded='true'] .history-month-fill { background: var(--history-active); box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--history-bar); transform: translateY(-1px); }
.history-month-button:focus-visible { outline-offset: 3px; }
.history-year { position: absolute; left: 0; top: calc(100% + 7px); padding-left: 6px; border-left: 1px solid var(--line); color: var(--soft); font-size: 11px; line-height: 1; font-variant-numeric: tabular-nums; }
.history-popover { position: absolute; z-index: 12; width: max-content; max-width: min(330px,100%); padding: 10px 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--bg); box-shadow: var(--journal-shadow); font-size: 12px; line-height: 1.6; animation: history-reveal .16s ease both; }
.history-popover::after { content: ''; position: absolute; left: var(--history-arrow,50%); top: calc(100% - 4px); width: 8px; height: 8px; background: var(--bg); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: translateX(-50%) rotate(45deg); }
.history-month-summary { margin: 0 0 5px; color: var(--muted); font-size: 11px; }
.history-popover ul { margin: 0; padding: 0; list-style: none; max-height: 180px; overflow-y: auto; }
.history-popover a { display: block; padding: 3px 0; color: var(--text-color); font-size: 13px; }
.history-popover a:hover { color: var(--blue); }
@keyframes history-reveal { from { opacity: 0; translate: 0 3px; } to { opacity: 1; translate: 0 0; } }
@media (max-width:600px) { .journal-history { margin-top: 44px; } .history-bars { gap: 3px; } .history-popover { max-width: 100%; } }

/* Small, non-modal writing links; no overlay interrupts the article list. */
.journal-link-group { position: relative; }
.journal-link-trigger { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: inherit; transition: color .18s ease; }
.journal-link-trigger:hover, .journal-link-trigger[aria-expanded='true'] { color: var(--text-color); }
.journal-link-trigger .journal-link-chevron { width: 12px; height: 12px; margin-left: -3px; transition: transform .2s ease; }
.journal-link-trigger[aria-expanded='true'] .journal-link-chevron { transform: rotate(180deg); }
.journal-link-popover { position: absolute; z-index: 22; top: calc(100% + 10px); left: 0; width: 320px; max-width: calc(100vw - 48px); max-height: min(580px,calc(100dvh - 48px)); overflow-y: auto; overscroll-behavior: contain; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--text-color); box-shadow: 0 18px 50px rgb(0 0 0 / 18%), 0 2px 8px rgb(0 0 0 / 6%); font-size: 13px; line-height: 1.65; animation: journal-popover-in .2s cubic-bezier(.2,.7,.2,1) both; }
.journal-link-popover[data-state='closing'] { pointer-events: none; animation: journal-popover-out .14s ease both; }
.journal-subscribe-popover { background: color-mix(in srgb,var(--bg) 94%,var(--text-color) 6%); }
.journal-link-popover > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.journal-link-popover h2 { margin: 0; font-size: 14px; font-weight: 600; }
.journal-popover-close { display: grid; place-items: center; width: 26px; height: 26px; margin: -4px -5px -4px 0; padding: 5px; border: 0; border-radius: 6px; background: transparent; color: var(--soft); }
.journal-popover-close:hover { color: var(--text-color); background: var(--surface); }
.journal-popover-intro { margin: 12px 0; color: var(--muted); font-size: 12px; }
[data-newsletter-form] input[type=email] { display: block; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: color-mix(in srgb,var(--bg) 86%,var(--text-color) 14%); font-size: 16px; line-height: 1.5; }
[data-newsletter-form] input[type=email]::placeholder { color: var(--soft); font-size: 13px; }
.newsletter-topic { display: flex; align-items: center; gap: 10px; padding: 12px; margin-top: 12px; border: 1px solid var(--line); border-radius: 11px; }
.newsletter-topic-icon { display: flex; color: var(--blue); }
.newsletter-topic strong { display: block; font-size: 13px; font-weight: 550; }
.newsletter-topic small { display: block; color: var(--soft); font-size: 11px; }
.newsletter-topic-check { display: flex; margin-left: auto; color: var(--blue); }
.newsletter-topic-check svg { width: 18px; height: 18px; }
.newsletter-privacy { margin: 17px 0 10px; color: var(--soft); font-size: 10px; line-height: 1.8; }
.newsletter-feedback { margin: 10px 0; color: var(--muted); font-size: 11px; }
.newsletter-feedback:empty { display: none; }
.newsletter-verification { width: 100%; }
.newsletter-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
[data-newsletter-form] > footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.journal-intro-links .newsletter-rss { display: grid; place-items: center; width: 30px; height: 30px; margin-left: -5px; border-radius: 6px; color: var(--soft); }
.newsletter-rss:hover { color: var(--text-color); background: var(--surface); }
.newsletter-submit { display: inline-flex; align-items: center; gap: 12px; min-height: 36px; padding: 7px 13px; border: 1px solid transparent; border-radius: 9px; background: var(--text-color); color: var(--bg); font-size: 12px; font-weight: 550; transition: opacity .16s ease,transform .16s ease; }
.newsletter-submit:not(:disabled):hover { opacity: .85; }
.newsletter-submit:active { transform: scale(.97); }
.newsletter-submit:disabled { cursor: default; opacity: .45; }
.newsletter-submit svg { width: 16px; height: 16px; }
.journal-contact-popover { width: 268px; padding: 12px 8px 9px; }
.journal-contact-caption { margin: 0 8px 9px; color: var(--soft); font-size: 11px; }
.journal-intro-links .journal-contact-popover > a { display: flex; width: 100%; align-items: center; gap: 11px; padding: 9px 8px; border-radius: 9px; transition: background .18s ease; }
.journal-contact-popover > a:hover, .journal-contact-popover > a:focus-visible { background: var(--surface); }
.journal-contact-icon { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px; background: color-mix(in srgb,var(--bg) 94%,var(--text-color) 6%); color: var(--muted); }
.journal-contact-icon svg { width: 18px; height: 18px; }
.journal-contact-popover strong { display: block; color: var(--text-color); font-size: 13px; font-weight: 550; }
.journal-contact-popover small { display: block; color: var(--soft); font-size: 11px; line-height: 1.5; }
.journal-contact-arrow { margin-left: auto; color: var(--soft); opacity: 0; transform: translate(-3px,2px); transition: opacity .18s ease,transform .18s ease; }
.journal-contact-popover a:is(:hover,:focus-visible) .journal-contact-arrow { opacity: 1; transform: none; }
@keyframes journal-popover-in { from { opacity: 0; transform: translateY(5px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes journal-popover-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(3px) scale(.99); } }
