/* The Craticula site design (spec FR-32, NFR-13). Light, dark and auto themes (#3556). Fonts are files of this site: nothing is loaded from another host. */
@font-face { font-family: "Bricolage Grotesque"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/bricolage-grotesque-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 800; font-style: normal; font-display: swap; src: url("fonts/bricolage-grotesque-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/instrument-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --bg: #FBF8F3;
  --surface: #F3EEE6;
  --text: #1C1916;
  --muted: #5E554A;
  --faint: #6B6155;
  --accent: #B83A0A;
  --accent-ink: #FFFFFF;
  --line: #DDD4C7;
  --line-strong: #C9BDAE;
  --code: #EFE8DD;
  --link: #B13A0A;
  --sand: #4A4238;
  --sage: #2F6B33;
  --amber: #8A4B00;
  --prose: #342D26;
  --lead: #3A322B;
  --soft: #4A4238;
  --code-ink: #9A3412;
  --note-bg: #FFF1DB;
  --note-line: #E3C48F;
  --note-ink: #5B3A0A;
  --panel-bg: rgba(255, 255, 255, 0.92);
  --glow: rgba(194, 65, 12, 0.16);
  --glow-0: rgba(194, 65, 12, 0);
  --stripe: rgba(194, 65, 12, 0.06);
  --link-under: rgba(177, 58, 10, 0.4);
  --scrim: rgba(28, 25, 22, 0.45);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #141210;
    --surface: #1C1916;
    --text: #F2EDE6;
    --muted: #A89F94;
    --faint: #8A8176;
    --accent: #FF7A3D;
    --accent-ink: #1A1208;
    --line: #2E2923;
    --line-strong: #3A342D;
    --code: #1F1B17;
    --link: #FF9A66;
    --sand: #E8DCCB;
    --sage: #9FD3A0;
    --amber: #FFB36B;
    --prose: #D9CFC2;
    --lead: #C9BFB2;
    --soft: #B7AD9F;
    --code-ink: #F2C9A5;
    --note-bg: #261F14;
    --note-line: #6B4A22;
    --note-ink: #E8D9B8;
    --panel-bg: rgba(28, 25, 22, 0.92);
    --glow: rgba(255, 122, 61, 0.28);
    --glow-0: rgba(255, 122, 61, 0);
    --stripe: rgba(255, 122, 61, 0.07);
    --link-under: rgba(255, 154, 102, 0.4);
    --scrim: rgba(10, 8, 6, 0.7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141210;
  --surface: #1C1916;
  --text: #F2EDE6;
  --muted: #A89F94;
  --faint: #8A8176;
  --accent: #FF7A3D;
  --accent-ink: #1A1208;
  --line: #2E2923;
  --line-strong: #3A342D;
  --code: #1F1B17;
  --link: #FF9A66;
  --sand: #E8DCCB;
  --sage: #9FD3A0;
  --amber: #FFB36B;
  --prose: #D9CFC2;
  --lead: #C9BFB2;
  --soft: #B7AD9F;
  --code-ink: #F2C9A5;
  --note-bg: #261F14;
  --note-line: #6B4A22;
  --note-ink: #E8D9B8;
  --panel-bg: rgba(28, 25, 22, 0.92);
  --glow: rgba(255, 122, 61, 0.28);
  --glow-0: rgba(255, 122, 61, 0);
  --stripe: rgba(255, 122, 61, 0.07);
  --link-under: rgba(255, 154, 102, 0.4);
  --scrim: rgba(10, 8, 6, 0.7);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #FBF8F3;
  --surface: #F3EEE6;
  --text: #1C1916;
  --muted: #5E554A;
  --faint: #6B6155;
  --accent: #B83A0A;
  --accent-ink: #FFFFFF;
  --line: #DDD4C7;
  --line-strong: #C9BDAE;
  --code: #EFE8DD;
  --link: #B13A0A;
  --sand: #4A4238;
  --sage: #2F6B33;
  --amber: #8A4B00;
  --prose: #342D26;
  --lead: #3A322B;
  --soft: #4A4238;
  --code-ink: #9A3412;
  --note-bg: #FFF1DB;
  --note-line: #E3C48F;
  --note-ink: #5B3A0A;
  --panel-bg: rgba(255, 255, 255, 0.92);
  --glow: rgba(194, 65, 12, 0.16);
  --glow-0: rgba(194, 65, 12, 0);
  --stripe: rgba(194, 65, 12, 0.06);
  --link-under: rgba(177, 58, 10, 0.4);
  --scrim: rgba(28, 25, 22, 0.45);
}
* { box-sizing: border-box; }
html { scroll-padding-top: 16px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Instrument Sans", system-ui, sans-serif; font-size: 1.0625rem; line-height: 1.7; }
a { color: var(--link); text-decoration-color: var(--link-under); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--link); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: 16px; top: -64px; padding: 10px 16px; background: var(--accent); color: var(--accent-ink); border-radius: 8px; font-weight: 600; z-index: 10; }
.skip:focus { top: 12px; }

.wrap-wide { max-width: 1320px; margin: 0 auto; padding: 0 32px; }

/* Header */
.top { border-bottom: 1px solid var(--line); }
.top > .wrap-wide { display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: center; padding-top: 20px; padding-bottom: 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 1.375rem; letter-spacing: -0.01em; }
.brand svg { color: var(--accent); }
.top-nav { display: flex; flex-wrap: wrap; gap: 6px 28px; flex-grow: 1; font-size: 0.9375rem; font-weight: 500; }
.top-nav a { color: var(--muted); text-decoration: none; padding: 8px 0; }
.top-nav a:hover { color: var(--text); }
.btn, .btn-ghost { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 12px; text-decoration: none; font-weight: 500; font-size: 1rem; }
.btn { background: var(--accent); color: var(--accent-ink); font-weight: 600; min-height: 52px; padding: 0 28px; font-size: 1.0625rem; }
.btn:hover { filter: brightness(1.12); }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--faint); background: var(--surface); }

/* Docs layout */
.layout { display: grid; grid-template-columns: 232px minmax(0, 1fr) 200px; gap: 56px; align-items: start; padding-top: 40px; padding-bottom: 80px; }
.side { font-size: 0.9375rem; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
.side-group { margin-bottom: 22px; }
.side-title { margin: 0 0 6px; padding: 0 12px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.side ul, .toc ul { list-style: none; margin: 0; padding: 0; }
.side li a { display: block; padding: 7px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
.side li a:hover { color: var(--text); background: var(--surface); }
.side li a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.toc { font-size: 0.875rem; color: var(--muted); border-left: 1px solid var(--line); padding-left: 20px; position: sticky; top: 16px; }
.toc:empty { display: none; }
.toc .side-title { padding: 0; margin-bottom: 10px; }
.toc li { margin-bottom: 8px; }
.toc a { color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
.toc a:hover { color: var(--text); }

/* Prose (the Markdown pages) */
.prose { min-width: 0; max-width: 760px; overflow-wrap: anywhere; }
.prose h1 { margin: 0 0 0.6em; font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1.02; letter-spacing: -0.03em; }
.prose h2 { margin: 2em 0 0.6em; font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 1.875rem; line-height: 1.15; letter-spacing: -0.02em; }
.prose h3 { margin: 1.6em 0 0.5em; font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 1.375rem; }
.prose h4 { margin: 1.4em 0 0.4em; font-weight: 600; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; color: var(--prose); }
.prose li { margin-bottom: 0.4em; }
.prose strong { color: var(--text); }
code { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.88em; background: var(--code); color: var(--code-ink); padding: 0.12em 0.4em; border-radius: 6px; }
pre { margin: 0 0 1.3em; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.875rem; line-height: 1.7; color: var(--sand); }
pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
table { border-collapse: collapse; display: block; overflow-x: auto; margin: 0 0 1.3em; font-size: 0.9375rem; }
th, td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
th { background: var(--surface); color: var(--text); }
/* A cell breaks a word only when the word alone is wider than the table; `anywhere` (inherited from .prose) would shrink every column to one letter. */
.prose th, .prose td { overflow-wrap: break-word; }
.prose th { white-space: nowrap; }
blockquote { margin: 0 0 1.3em; padding: 14px 20px; border: 1px solid var(--note-line); border-radius: 12px; background: var(--note-bg); color: var(--note-ink); }
blockquote p { margin: 0; color: inherit; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

.img-alt { display: inline-block; margin: 0 6px 6px 0; padding: 1px 10px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 0.8125rem; line-height: 1.6; }

/* Footer */
.foot { border-top: 1px solid var(--line); margin-top: 32px; font-size: 0.875rem; color: var(--muted); }
.foot > .wrap-wide { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; justify-content: space-between; padding-top: 32px; padding-bottom: 48px; }
.foot a { color: var(--prose); }

/* Home */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse 70% 55% at 50% 105%, var(--glow), var(--glow-0) 70%),
    repeating-linear-gradient(90deg, var(--stripe) 0 2px, var(--glow-0) 2px 34px), var(--bg); }
.hero-inner { display: flex; flex-direction: column; gap: 30px; padding-top: 72px; padding-bottom: 88px; }
.hero h1 { margin: 0; max-width: 980px; font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: clamp(2.6rem, 7vw, 5.5rem); line-height: 0.98; letter-spacing: -0.035em; }
.accent { color: var(--accent); }
.lead { margin: 0; max-width: 680px; font-size: 1.25rem; line-height: 1.55; color: var(--lead); }
.cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.diagram { margin: 28px 0; overflow-x: auto; }
.diagram svg { display: block; width: 100%; min-width: 600px; height: auto; }
.fine { margin: 0; font-size: 0.875rem; color: var(--muted); }
.get { display: flex; flex-wrap: wrap; gap: 14px 36px; margin: 0; padding: 0; list-style: none; }
.get li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.get-label { min-width: 5.5rem; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.get code { padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--code); color: var(--code-ink); font-size: 0.875rem; white-space: nowrap; }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text); font-size: 0.9375rem; font-weight: 500; text-decoration: none; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.demo { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
.panel { flex: 1 1 420px; min-width: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--panel-bg); overflow: hidden; }
.panel:last-child { flex-basis: 520px; }
.panel-title { padding: 12px 20px; border-bottom: 1px solid var(--line); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.panel pre { margin: 0; border: 0; border-radius: 0; background: none; padding: 20px; }
.p { color: var(--faint); } .n { color: var(--amber); } .s { color: var(--sage); } .k { color: var(--accent); } .c { color: var(--faint); }

.band { padding-top: 88px; padding-bottom: 8px; }
.band h2 { margin: 0 0 12px; max-width: 760px; font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: clamp(1.9rem, 4vw, 2.875rem); line-height: 1.08; letter-spacing: -0.025em; }
.muted { color: var(--soft); max-width: 760px; margin: 0 0 40px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px; margin-top: 32px; }
.card { padding: 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.card h3 { margin: 0 0 8px; font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 1.5rem; }
.card p { margin: 0; color: var(--soft); }

.home-docs h2 { margin-bottom: 32px; }
.home-docs ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.home-docs li { margin: 0; padding: 22px 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.home-docs li:hover { border-color: var(--accent); }
.home-docs li a { display: block; font-weight: 600; font-size: 1.125rem; color: var(--text); text-decoration: none; }
.home-docs li a:hover { color: var(--accent); }
.home-docs li em { display: block; font-style: normal; font-size: 0.9375rem; color: var(--muted); }

@media (max-width: 1100px) {
  .layout { grid-template-columns: 232px minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 800px) {
  .wrap-wide { padding: 0 16px; }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 24px; }
  .side { position: static; max-height: none; overflow: visible; }
  .hero-inner { padding-top: 40px; padding-bottom: 56px; }
  .band { padding-top: 56px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

/* Collapsible sidebar groups and the previous / next links (#3555, DS-2, DS-8) */
.side details > summary { cursor: pointer; list-style: none; margin: 0 0 6px; padding: 6px 12px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); border-radius: 8px; }
.side details > summary::-webkit-details-marker { display: none; }
.side details > summary::after { content: "+"; float: right; font-weight: 400; }
.side details[open] > summary::after { content: "–"; }
.side details > summary:hover { color: var(--text); }
.side .side-sub > details > summary { text-transform: none; letter-spacing: 0; font-size: 0.9375rem; font-weight: 500; color: var(--muted); margin: 0; }
.side .side-sub ul { padding-left: 12px; }
.pager { display: flex; gap: 16px; justify-content: space-between; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line, currentColor); }
.pager a { display: flex; flex-direction: column; gap: 4px; flex: 1 1 0; padding: 14px 16px; border: 1px solid var(--line, currentColor); border-radius: 10px; text-decoration: none; color: var(--text); }
.pager a:hover { border-color: var(--accent); }
.pager span { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.pager-next { text-align: right; margin-left: auto; }
@media (max-width: 640px) { .pager { flex-direction: column; } }

/* Page features (#3556): top bar actions, heading anchors, copy buttons, search, the phone menu */
.top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line-strong); border-radius: 10px; background: none; color: var(--text); cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: var(--surface); border-color: var(--faint); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-button .i-light, .theme-button .i-dark { display: none; }
html[data-theme="light"] .theme-button .i-auto, html[data-theme="dark"] .theme-button .i-auto { display: none; }
html[data-theme="light"] .theme-button .i-light, html[data-theme="dark"] .theme-button .i-dark { display: block; }
.menu-toggle { display: none; align-items: center; gap: 8px; min-height: 44px; margin: 0 0 16px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 10px; background: none; color: var(--text); font: inherit; font-weight: 500; cursor: pointer; }
.menu-toggle svg { width: 20px; height: 20px; }
.prose h2, .prose h3, .prose h4 { position: relative; }
.anchor { margin-left: 0.4em; color: var(--faint); text-decoration: none; font-weight: 400; opacity: 0; }
.prose h2:hover .anchor, .prose h3:hover .anchor, .prose h4:hover .anchor, .anchor:focus-visible { opacity: 1; }
.prose pre { position: relative; overflow-wrap: normal; }
.copy-button { position: absolute; top: 8px; right: 8px; min-height: 32px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 0.8125rem; cursor: pointer; opacity: 0; }
.prose pre:hover .copy-button, .copy-button:focus-visible, .copy-button[data-state="copied"] { opacity: 1; }
.search-overlay { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; background: var(--scrim); }
.search-overlay[hidden] { display: none; }
.search-box { width: 100%; max-width: 640px; max-height: 70vh; display: flex; flex-direction: column; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--bg); color: var(--text); overflow: hidden; }
.search-input { width: 100%; min-height: 56px; padding: 0 20px; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; font: inherit; font-size: 1.0625rem; }
.search-input:focus-visible { outline-offset: -3px; }
.search-results { list-style: none; margin: 0; padding: 8px; overflow-y: auto; }
.search-note { margin: 0; padding: 16px 20px; color: var(--muted); }
.search-hit { display: block; padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none; }
.search-hit strong { display: block; font-weight: 600; }
.search-hit span { display: block; color: var(--muted); font-size: 0.875rem; }
[aria-selected="true"] > .search-hit, .search-hit:hover { background: var(--surface); }
.search-status { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 800px) {
  .top-actions { margin-left: 0; }
  html.js .side { display: none; }
  html.js.menu-open .side { display: block; }
  html.js .menu-toggle { display: inline-flex; }
}
html:not(.js) .search-button, html:not(.js) .theme-button { display: none; }

/* Home page (#3557): eyebrow, group cards, the numbered path */
.eyebrow { margin: 0; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.group-cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
a.card { display: block; color: inherit; text-decoration: none; }
a.card:hover { border-color: var(--accent); }
.path { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 20px; }
.path li { border-top: 2px solid var(--accent); padding-top: 16px; }
.path .step { display: block; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.8125rem; color: var(--muted); }
.path h3 { margin: 4px 0 8px; font-family: "Bricolage Grotesque", sans-serif; font-size: 1.375rem; }
.path h3 a { color: var(--text); text-decoration: none; }
.path h3 a:hover { color: var(--link); }
.path p { margin: 0; color: var(--soft); }

/* Language control (spec 004): a plain-link dropdown, no script; colours from the custom properties above */
.lang-menu { position: relative; font-size: 0.9375rem; max-width: 100%; overflow-wrap: anywhere; }
.lang-dropdown > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--text); cursor: pointer; list-style: none; max-width: 100%; overflow-wrap: anywhere; }
.lang-dropdown > summary::-webkit-details-marker { display: none; }
.lang-dropdown > summary::after { content: "\25BE"; color: var(--muted); }
.lang-dropdown > summary:hover { border-color: var(--faint); background: var(--surface); }
.lang-panel { position: absolute; right: 0; z-index: 20; display: flex; flex-direction: column; gap: 2px; margin-top: 6px; padding: 8px; min-width: min(14rem, calc(100vw - 32px)); max-width: calc(100vw - 32px); border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg); overflow-wrap: anywhere; }
.lang-panel a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
.lang-panel a:hover { color: var(--text); background: var(--surface); }
.lang-panel a[aria-current="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.lang-note { display: block; padding: 0 12px 6px; color: var(--faint); font-size: 0.8125rem; overflow-wrap: anywhere; }
.en-mark { color: var(--faint); font-size: 0.875em; font-weight: 400; }

/* Chinese: our Latin fonts first (they hold no Chinese glyphs), then system fonts; no remote font and no font file */
:lang(zh-Hans), [lang="zh-Hans"] { font-family: "Instrument Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", "Source Han Sans SC", "WenQuanYi Micro Hei", "SimHei", sans-serif; }
[lang="zh-Hans"] .prose h1, [lang="zh-Hans"] .prose h2, [lang="zh-Hans"] .prose h3, [lang="zh-Hans"] .prose h4 { font-family: "Bricolage Grotesque", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", "Source Han Sans SC", "WenQuanYi Micro Hei", "SimHei", sans-serif; letter-spacing: 0; }
[lang="zh-Hans"] pre, [lang="zh-Hans"] code { font-family: "JetBrains Mono", ui-monospace, monospace; }
@media (max-width: 800px) { .lang-panel { right: auto; left: 0; } }

/* Long German words and unspaced lines wrap in the page text */
body, .prose, .card, .foot { overflow-wrap: anywhere; }
