/* A personal home page: ordinary type, ordinary links, no browser scripts. */
/* SPDX-License-Identifier: MPL-2.0
   Existing engine stylesheet; legal text: /licenses/MPL-2.0.txt */
:root { color-scheme: light; background: #fff; color: #000; }
* { box-sizing: border-box; }
body { max-width: 46rem; margin: 2rem auto; padding: 0 1rem; font: 1.125rem/1.65 Georgia, "Times New Roman", "Noto Serif CJK SC", "Songti SC", SimSun, serif; overflow-wrap: anywhere; }
a, a:visited { color: #0000ee; text-decoration: underline; }
a:active { color: #c00; }
a:focus-visible { outline: 2px solid #000; outline-offset: 3px; }
header { border-bottom: 1px solid #888; padding-bottom: 1rem; }
.sitename { font-size: 1.5rem; font-weight: bold; margin: 0 0 .4rem; }
nav { line-height: 2; }
nav a { display: inline-block; white-space: nowrap; }
nav span { margin: 0 .25rem; }
main { margin: 1.75rem 0 2.5rem; }
h1 { font-size: 1.9rem; line-height: 1.25; }
h2 { font-size: 1.4rem; line-height: 1.35; margin-top: 1.8rem; }
h3 { font-size: 1.2rem; }
li { margin: .55rem 0; }
time, .date { color: #444; }
.archive { padding-left: 1.3rem; }
.archive time { display: inline-block; min-width: 6.2rem; font-size: 1rem; }
pre { overflow-x: auto; padding: .75rem; background: #f4f4f4; border: 1px solid #aaa; font-size: .9rem; overflow-wrap: normal; }
code { font-family: "Courier New", monospace; }
blockquote { margin-left: 1rem; padding-left: 1rem; border-left: 2px solid #888; }
img, video, svg { max-width: 100%; height: auto; }
table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
td, th { border: 1px solid #888; padding: .3rem .5rem; }
footer { font-size: .95rem; }
hr { border: 0; border-top: 1px solid #888; }
.skip { position: absolute; left: -10000px; }
.skip:focus { position: static; }
:lang(zh-CN) { line-height: 1.85; }
@media (max-width: 30rem) { body { margin: 1rem auto; } h1 { font-size: 1.65rem; } .archive time { display: block; } nav span { margin: 0 .1rem; } }

/* Homepage layout only; article typography above stays unchanged. */
.home { display: flex; flex-direction: column; min-height: 100svh; margin: 0 auto; padding: 2rem 1rem; }
.home > h1 { margin: 0; }
.home > main { flex: 1; display: grid; place-items: center; margin: 0; padding: 2rem 0; }
.home .recent { list-style: none; max-width: 100%; margin: 0; padding: 0; }
.home > footer { text-align: center; }
.home > footer > p { margin: 0; }

/* Shared blog shell. Normalize collapsed outer margins, retaining reading type,
   measure and all spacing between the original article elements. */
.blog { --footer-inset: 2rem; display: flex; flex-direction: column; min-height: 100vh; margin: 0 auto; padding: 2rem 1rem max(2rem, env(safe-area-inset-bottom)); }
.blog:not(.home) > main { margin: 0 0 2.5rem; }
.blog:not(.home) > main > :first-child,
.blog article > :first-child { margin-top: 0; }
.site-footer { margin-top: auto; }
.footer-links { position: relative; display: flex; align-items: center; justify-content: center; width: max-content; max-width: 100%; margin: 0 auto; }
.footer-links > a, .footer-links > button, .copyright-fallback > summary { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; margin: 0; border: 0; background: transparent; color: #666; font: inherit; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.footer-links > a:visited { color: #666; }
.footer-links svg { display: block; width: 16px; height: 16px; }
.copyright-trigger span, .copyright-fallback > summary span { color: #707070; font-size: 14px; }
.footer-links > a:hover, .footer-links > button:hover, .copyright-fallback > summary:hover { color: #222; }
.footer-links > button:focus-visible, .copyright-fallback > summary:focus-visible { outline: 2px solid #000; outline-offset: 3px; }
.copyright-fallback { width: 44px; }
.copyright-fallback > summary { list-style: none; }
.copyright-fallback > summary::-webkit-details-marker { display: none; }
.copyright-copy { width: min(42rem, calc(100vw - 2rem)); max-height: calc(100vh - max(var(--footer-inset), env(safe-area-inset-bottom)) - 4.25rem); padding: 1rem; margin: 0; overflow: auto; overscroll-behavior: contain; border: 0; background: #fff; color: #000; text-align: left; font-size: .95rem; line-height: 1.65; }
.copyright-copy:focus { outline: none; }
.copyright-copy h2 { margin: 0 0 .75rem; font-size: 1.1rem; line-height: 1.35; }
.copyright-copy p, .copyright-copy ul { margin: .75rem 0; }
.copyright-copy ul { padding-left: 1.25rem; }
.copyright-fallback .copyright-copy { position: absolute; bottom: calc(100% + .5rem); left: 50%; transform: translateX(-50%); z-index: 1; }
.footer-links > .copyright-trigger, .copyright-popover { display: none; }
@supports (height: 100svh) {
  .blog { min-height: 100svh; }
  .copyright-copy { max-height: calc(100svh - max(var(--footer-inset), env(safe-area-inset-bottom)) - 4.25rem); }
}
@supports selector(:popover-open) {
  .footer-links > .copyright-trigger { display: inline-flex; }
  .copyright-fallback { display: none; }
  .copyright-popover:popover-open { display: block; }
  .copyright-popover { position: fixed; inset: auto 1rem calc(max(var(--footer-inset), env(safe-area-inset-bottom)) + 3.25rem); margin-inline: auto; }
}
@media (max-width: 30rem) {
  .blog:not(.home) { --footer-inset: 1rem; padding-block: 1.75rem max(1rem, env(safe-area-inset-bottom)); }
}
