:root { --bg: var(--kit-bg); --fg: var(--kit-fg); --mute: var(--kit-mute); --line: var(--kit-line); --accent: var(--kit-accent); --soft: var(--kit-soft); --code: var(--kit-code); --k: var(--kit-k); --s: var(--kit-s); --c: var(--kit-c); --n: var(--kit-n); --tip: var(--kit-tip); --warn: var(--kit-warn); --danger: var(--kit-danger); --radius: var(--kit-radius); --icon: var(--kit-icon); color-scheme: light; }
/* colors live once in header.css (--kit-*, light and dark); this file only maps its short names onto them ---- */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; } }
:root[data-theme="dark"] { color-scheme: dark; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; }
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; text-underline-offset: 3px; }
a:is(:hover, :focus-visible):not(.k-soc, .k-ico, .k-btn, .tags a, .cards h2 a, .k-head a, .k-side a, .k-foot-nav a) { text-decoration: underline; text-decoration-thickness: 1px; filter: brightness(1.15); }
/* Chinese, Japanese, Korean: their own fonts and more line space ---- */
html:lang(zh) body { font-family: system-ui, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", sans-serif; line-height: 1.8; }
html:lang(ja) body { font-family: system-ui, "Hiragino Sans", "Yu Gothic UI", "Meiryo", "Noto Sans JP", "Noto Sans CJK JP", sans-serif; line-height: 1.8; }
html:lang(ko) body { font-family: system-ui, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR", sans-serif; line-height: 1.8; word-break: keep-all; }
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 2rem; margin: 0.2em 0 0.4em; }
.meta, .crumbs, .pager, .more { color: var(--mute); font-size: 0.92rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.cover { margin: 1em 0; }
.cover img { display: block; width: 100%; height: auto; }
/* every picture, video and frame shares one corner radius ---- */
.cover img, .content img, .content video, .content iframe, .c-figure img, .c-video video, .c-ratio iframe, .c-gallery img { border-radius: var(--radius); }
.toc { background: var(--soft); border-radius: var(--radius); padding: 10px 16px; margin: 18px 0; font-size: 0.95rem; }
.toc ol { margin: 6px 0; padding-left: 20px; }
.content blockquote { margin: 1em 0; padding: 4px 16px; border-left: 4px solid var(--line); color: var(--mute); }
.content table, .c-table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: 0.95rem; }
.content th, .content td { border: 1px solid var(--line); padding: 6px 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.tags a { background: var(--soft); border-radius: 99px; padding: 2px 10px; text-decoration: none; font-size: 0.88rem; }
.share { display: flex; gap: 8px 28px; flex-wrap: wrap; align-items: baseline; margin: 22px 0; font-size: 0.88rem; }
.k-pg { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.k-pl::after { content: ":"; }
.k-pmore { display: contents; }
.k-pmore[hidden] { display: none; }
@media (max-width: 720px) { .share { flex-direction: column; align-items: flex-start; } }
.k-lnk { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: none; text-underline-offset: 3px; cursor: pointer; }
.k-lnk:hover, .k-lnk:focus-visible { text-decoration: underline; text-decoration-thickness: 1px; }
.prev-next { display: flex; justify-content: space-between; gap: 12px; margin: 26px 0; padding-top: 14px; border-top: 1px solid var(--line); }
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.cards li { border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.cards h2 { font-size: 1.25rem; margin: 0 0 4px; }
.cards h2 a { color: var(--fg); text-decoration: none; }
.cards p { margin: 4px 0; }
.pager { display: flex; justify-content: space-between; margin-top: 22px; }
.notfound { text-align: center; padding-top: 60px; }
pre { background: var(--code); border-radius: var(--radius); padding: 14px 16px; overflow-x: auto; font-size: 0.88rem; line-height: 1.5; }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace; font-size: 0.92em; }
:not(pre) > code { background: var(--code); padding: 1px 5px; border-radius: 5px; }
.tok-k { color: var(--k); } .tok-s { color: var(--s); } .tok-c { color: var(--c); font-style: italic; } .tok-n { color: var(--n); }
.c-video, .c-audio, .c-figure { margin: 1.2em 0; }
.c-ratio { position: relative; aspect-ratio: 16 / 9; }
.c-ratio iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.c-audio audio, .c-video video { width: 100%; }
figcaption { color: var(--mute); font-size: 0.9rem; margin-top: 6px; }
.c-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin: 1.2em 0; }
.c-gallery figure { margin: 0; }
.c-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.c-callout { border-radius: var(--radius); padding: 10px 16px; margin: 1.2em 0; background: var(--soft); border-left: 4px solid var(--accent); }
.c-tip { border-left-color: var(--tip); } .c-warn { border-left-color: var(--warn); } .c-danger { border-left-color: var(--danger); }
.c-callout-title { font-weight: 700; margin: 4px 0; }
.c-callout-title:empty { display: none; }
.c-tabs .tab-buttons { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.c-tabs .tab-buttons button { border: 0; background: none; color: var(--mute); padding: 8px 12px; font: inherit; cursor: pointer; border-bottom: 2px solid transparent; }
.c-tabs .tab-buttons button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }
.c-tabs.ready .c-tab-title { display: none; }
.c-details { background: var(--soft); border-radius: var(--radius); padding: 8px 14px; margin: 1em 0; }
@media (max-width: 560px) { body { font-size: 16px; } h1 { font-size: 1.6rem; } }
/* wide tables and code scroll inside their box instead of widening the page ---- */
.content table { display: block; overflow-x: auto; }
.content img { height: auto; }
@media print { .share, .prev-next { display: none; } }
