/* Neutral black interface; all original artworks keep their source colors. */
:root{color-scheme:dark;--font:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;--bg:#080808;--surface:#111;--surface-raised:#1c1c1c;--ink:#f2f2f2;--muted:#b3b3b3;--quiet:#8e8e8e;--accent:#f2f2f2;--accent-hover:#fff;--line:#ffffff1c;--line-strong:#ffffff38;--accent-line:#ffffff50;--shadow:#0009}
*{box-sizing:border-box}html{scroll-behavior:smooth;scrollbar-color:#555 var(--bg)}body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.65 var(--font);-webkit-font-smoothing:antialiased}a{color:inherit;text-decoration:none}button{font:inherit;cursor:pointer}button,a{-webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible,[tabindex]:focus-visible{outline:2px solid #fff;outline-offset:4px}::selection{background:#eee;color:#111}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.skip-link{position:fixed;z-index:30;left:20px;top:10px;background:#fff;color:#080808;padding:10px 16px;transform:translateY(-180%)}.skip-link:focus{transform:none}
.main-shell{margin-left:0;padding:0 clamp(24px,4vw,72px)}.page-header,main{width:100%;max-width:1100px;margin-inline:auto}.page-header{padding-top:48px}.page-header h1{font-size:clamp(24px,2.5vw,36px);font-weight:500;line-height:1.5;letter-spacing:-.025em;margin:0 0 36px;text-align:center;overflow-wrap:anywhere}main:focus{outline:none}.artwork{overflow:hidden;background:#111}.artwork img{display:block;width:100%;height:auto;margin:0}body[data-kind=article] .page-header,body[data-kind=article] main{max-width:940px}.article-reader{background:transparent;overflow-wrap:anywhere;padding:0 0 20px}.article-reader p{font-size:16px;line-height:2;color:#bdbdbd;margin:18px 0}.article-reader>p:first-of-type{margin-top:0;padding-bottom:28px;color:#b3b3b3}.article-reader h2{font-size:22px;line-height:1.6;font-weight:500;letter-spacing:-.02em;margin:44px 0 16px;color:#eee}.article-figure{margin:26px 0 36px;border:1px solid var(--line);border-radius:4px;overflow:hidden}.article-figure img{display:block;max-width:100%;height:auto}.article-figure figcaption{padding:20px;background:#1c1c1c;color:var(--muted);font-size:12px;text-align:center}
.return-top{position:fixed;z-index:9;right:22px;bottom:24px;display:grid;place-items:center;width:44px;height:44px;border-radius:50%;border:1px solid #ffffff3a;background:#171717;color:#eee;box-shadow:0 4px 20px #0006}.return-top svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
@media(hover:hover){.return-top:hover{background:#333}}
@media(min-width:1900px){.main-shell{padding-inline:90px}.page-header{padding-top:60px}}
@media(max-width:1050px){.main-shell{padding-inline:28px}.page-header h1{font-size:27px}}
@media(max-width:760px){.main-shell{margin-left:0;padding-inline:20px}.page-header{padding-top:30px}.page-header h1{font-size:25px;margin:0 0 26px}.article-reader h2{font-size:20px;margin-top:34px}.article-reader p{font-size:15px;line-height:1.95}.article-figure{margin:22px 0 28px}.return-top{right:16px;bottom:18px}main{scroll-margin-top:20px}}
@media(max-width:360px){.main-shell{padding-inline:16px}.page-header h1{font-size:22px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important}}

.reading-progress{position:fixed;inset:0 0 auto;z-index:20;height:2px;background:#ffffff12;pointer-events:none}.reading-progress span{display:block;width:100%;height:100%;background:#ededed;transform:scaleX(0);transform-origin:left}.main-shell{padding-bottom:max(128px,calc(env(safe-area-inset-bottom) + 112px))}

.page-dots{position:fixed;z-index:9;right:22px;bottom:max(16px,env(safe-area-inset-bottom));display:flex;align-items:center;gap:0;height:28px}.page-dots a{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;touch-action:manipulation}.page-dots a:before{content:"";display:block;width:7px;height:7px;border-radius:50%;background:#686868;transition:background .18s,transform .18s}.page-dots a[aria-current=page]:before{background:#c8c8c8;transform:scale(1.25)}.page-dots a:focus-visible{outline-offset:0}.return-top{bottom:max(60px,calc(env(safe-area-inset-bottom) + 44px))}@media(hover:hover){.page-dots a:hover:before{background:#b5b5b5;transform:scale(1.25)}}@media(max-width:760px){.page-dots{right:16px}}

.image-retry{display:block;width:100%;min-height:100px;padding:24px;border:1px solid var(--line);background:#151515;color:#bbb;text-align:center;font:inherit}.image-retry:disabled{cursor:wait;color:#888}

/* Tutorial formatting stays within the existing black reading layout. */
.codex-tutorial{line-height:1.85}.codex-tutorial h3{margin:30px 0 12px;font-size:19px;font-weight:500;color:#eee}.codex-tutorial h4,.codex-tutorial h5{margin:24px 0 10px;font-size:16px;font-weight:500;color:#ddd}.codex-tutorial ul,.codex-tutorial ol{padding-left:24px;margin:14px 0 24px;color:#bdbdbd}.codex-tutorial li{margin:7px 0;overflow-wrap:anywhere}.codex-tutorial a{color:#e0e0e0;text-decoration:underline;text-underline-offset:4px;overflow-wrap:anywhere}.codex-tutorial code{font-family:ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace;font-size:.88em;background:#1a1a1a;padding:2px 5px;border-radius:3px;color:#e4e4e4}.codex-tutorial pre{padding:20px 22px;overflow:auto;border:1px solid #ffffff1c;border-radius:5px;background:#111;line-height:1.75;tab-size:2;white-space:pre;overflow-wrap:normal}.codex-tutorial pre code{background:transparent;border:0;padding:0;font-size:13px;white-space:pre}.codex-tutorial .article-source{font-size:12px;line-height:1.9;color:#929292;border:0;padding-bottom:0}.codex-tutorial .article-credit{margin-top:44px}.code-example{margin:20px 0}.codex-tutorial .code-label{margin:0 0 7px;font-size:11px;color:#999}.code-example pre{margin-top:0}.tutorial-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:12px;margin:24px 0}.tutorial-card,.tutorial-note{border:1px solid #ffffff1a;border-radius:5px;background:#101010;padding:18px;margin:18px 0;color:#b3b3b3}.tutorial-grid .tutorial-card{margin:0}.tutorial-note p{font-size:14px;margin:8px 0}.codex-tutorial .article-figure{background:#111}.codex-tutorial .article-figure img{width:100%;max-width:100%;height:auto}.codex-tutorial strong{color:#e4e4e4;font-weight:500}@media(max-width:760px){.codex-tutorial pre{padding:16px}.codex-tutorial pre code{font-size:12px}.codex-tutorial h3{font-size:18px}.page-dots a{width:26px}.page-dots{max-width:calc(100vw - 32px)}}

.poster-tutorial .article-figure{margin:20px 0;background:#fff}.poster-tutorial .article-source{font-size:12px;line-height:1.8;color:#929292;margin-top:30px}.poster-tutorial .article-source a{color:#aaa;text-decoration:underline;text-underline-offset:4px}@media(max-width:760px){.poster-tutorial .article-figure{margin:14px 0}}
