/* Kounta — parts: controls, ornament, sub-pages. */
.pattern::before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;opacity:.13;background-size:96px 96px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96' fill='none' stroke='%23C9A24A' stroke-width='1'%3E%3Cpath d='M26 26h44v44H26zM48 17l31 31-31 31-31-31z'/%3E%3Cpath d='M0 48h17M79 48h17M48 0v17M48 79v17' opacity='.6'/%3E%3C/svg%3E")}
.pattern-soft::before{opacity:.07}

.theme{display:inline-grid;place-items:center;width:2.5rem;height:2.5rem;border-radius:50%;border:1px solid var(--line);background:var(--bg-2);cursor:pointer;padding:0}
.theme:hover{background:var(--bg-3)}
.theme svg{width:1.15rem;height:1.15rem;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.theme .sun{display:none}
:root[data-theme="dark"] .theme .sun{display:block}
:root[data-theme="dark"] .theme .moon{display:none}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .theme .sun{display:block}
  :root:not([data-theme="light"]) .theme .moon{display:none}
}
.lang{font-size:.9rem;text-decoration:none;padding:.4rem .85rem;border:1px solid var(--line);border-radius:999px;color:var(--ink);background:var(--bg-2);font-weight:400;line-height:1.2}
.lang:hover{background:var(--bg-3);color:var(--ink)}
/* Three-way language switch: one pill, three segments, the current one filled. */
.langs{display:inline-flex;border:1px solid var(--line);border-radius:999px;background:var(--bg-2);overflow:hidden}
.langs .lang{border:0;border-radius:0;background:transparent;padding:.45rem .7rem;min-width:2.5rem;text-align:center}
.langs .lang+.lang{border-inline-start:1px solid var(--line)}
.langs a.lang:hover{background:var(--bg-3)}
.langs [aria-current]{background:var(--ink);color:var(--bg);font-weight:500}
.btn{display:inline-block;padding:.6rem 1.2rem;border-radius:999px;background:var(--ink);color:var(--bg);text-decoration:none;font-weight:500}
.btn:hover{background:var(--accent);color:#fff}

/* Ornament: an eight-point star used as a section divider. */
.star-rule{display:flex;align-items:center;gap:1rem;color:var(--gold-soft);justify-content:center;padding-block:.5rem}
.star-rule::before,.star-rule::after{content:"";flex:1;max-width:8rem;height:1px;background:var(--line)}
.star-rule svg{width:1.1rem;height:1.1rem;fill:currentColor}

/* Sub-pages: sources, 404 */
.page-title{padding-block:clamp(2.5rem,6vw,4rem) 1rem;display:grid;gap:.75rem}
.page-title h1{font-size:clamp(2rem,1.5rem + 2vw,3rem)}
.sources{padding-inline-start:1.5rem;margin:0;display:grid;gap:1rem;max-width:52rem}
.sources li{display:grid;gap:.2rem;padding-block:.25rem}
.sources li::marker{color:var(--gold);font-weight:600;font-variant-numeric:tabular-nums}
.sources .title{font-weight:500}
.sources a{word-break:break-word;font-size:.9rem;direction:ltr;unicode-bidi:isolate;display:inline-block;color:var(--accent)}
.sources .use{font-size:.93rem;color:var(--ink-2)}
.note{padding:1rem 1.15rem;border-inline-start:3px solid var(--gold-soft);background:var(--bg-2);border-radius:.25rem;font-size:.95rem;color:var(--ink-2);max-width:52rem}
.notfound{text-align:center;padding-block:clamp(4rem,12vw,8rem);display:grid;gap:1rem;justify-items:center}
.notfound .code{font-family:var(--font-display);font-weight:700;font-size:clamp(5rem,20vw,10rem);line-height:1;color:var(--gold-soft)}
