/* 由 tools/ReferenceBuilder 從 docs/reference/messages.json 產生，請勿手改。重產：dotnet run --project tools/ReferenceBuilder -- . */

:root {
  color-scheme: light dark;
  --bg: #fbfbf9;
  --panel: #f1f0ea;
  --fg: #1c1c19;
  --muted: #6c6b63;
  --line: #dcdad0;
  --link: #14539a;
  --code-bg: #eceae3;
  --ok: #1d7a41;
  --warn: #8a5d00;
  --bad: #a32c2c;
  --mark: #fff6c9;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181a;
    --panel: #1e2124;
    --fg: #e4e5e2;
    --muted: #9a9c98;
    --line: #333739;
    --link: #86b8f0;
    --code-bg: #23272a;
    --ok: #5fce8a;
    --warn: #e0b13e;
    --bad: #ef8c8c;
    --mark: #423a1c;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { height: 100%; }

body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  display: flex;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  line-height: 1.65;
}

code, pre, h3 .sf, h3 .nm, td.v, p.used a, .streams a {
  font-family: ui-monospace, "Cascadia Mono", Consolas, "DejaVu Sans Mono", monospace;
}

a { color: var(--link); }

nav.side {
  flex: 0 0 13.5rem;
  height: 100%;
  overflow-y: auto;
  padding: 1.25rem 1rem 2rem;
  background: var(--panel);
  border-right: 1px solid var(--line);
  font-size: 0.875rem;
}
nav.side .brand { margin: 0 0 1rem; font-weight: 700; line-height: 1.3; }
nav.side ul { margin: 0 0 1.25rem; padding: 0; list-style: none; }
nav.side li { margin: 0.15rem 0; }
nav.side a { text-decoration: none; }
nav.side a:hover { text-decoration: underline; }
nav.side .here { color: var(--fg); font-weight: 700; }
nav.side .group { margin: 0 0 0.35rem; color: var(--muted); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; }
nav.side .n { color: var(--muted); font-size: 0.75rem; }
nav.side .lang { margin: 0; padding-top: 0.75rem; border-top: 1px solid var(--line); }

main { flex: 1 1 auto; min-width: 0; height: 100%; overflow-y: auto; padding: 1.75rem 2rem 5rem; }
main > * { max-width: 56rem; }
aside.pane { flex: 0 0 22rem; height: 100%; overflow-y: auto; padding: 1.75rem 1.25rem 3rem 1.5rem; border-left: 1px solid var(--line); }
aside.pane .item { scroll-margin-top: 1.75rem; }
section.msg p.desc { margin: 0.35rem 0 0.6rem; max-width: 62ch; }
aside.pane .item h3 { margin-top: 0; }
aside.pane .hint { margin: 0; color: var(--muted); font-size: 0.8125rem; line-height: 1.6; }
h1 { margin: 0 0 0.5rem; font-size: 1.55rem; }
h2 { margin: 2.25rem 0 0.5rem; padding-bottom: 0.25rem; border-bottom: 2px solid var(--line); font-size: 1.2rem; }
h2 .n { color: var(--muted); font-size: 0.8rem; font-weight: 400; }
p { margin: 0.5rem 0; }

p.std { color: var(--muted); }
ul.stats { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin: 1rem 0; padding: 0; list-style: none; }
ul.stats li { padding: 0.5rem 0.9rem; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; }
ul.stats .k { color: var(--muted); }
ul.stats .n { font-size: 1.25rem; font-weight: 700; }

table { border-collapse: collapse; margin: 0.75rem 0; font-size: 0.9rem; }
th, td { padding: 0.3rem 0.75rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--panel); font-weight: 600; }
table.streams td.s { width: 4rem; }

section.msg { padding: 1rem 0 0.75rem; border-top: 1px solid var(--line); scroll-margin-top: 0.5rem; }
section.item { padding: 0.9rem 0 0.6rem; border-top: 1px solid var(--line); scroll-margin-top: 0.5rem; }
table.streams td.fns { line-height: 2; }
table.streams th { text-align: left; }
table.streams td.fns a { display: inline-block; min-width: 1.6rem; margin: 0 0.15rem; padding: 0 0.2rem; text-align: center; text-decoration: none; border-radius: 2px; }
table.streams td.fns a:hover { background: var(--mark); text-decoration: none; }
p.legend { margin: 0.25rem 0 0.75rem; font-size: 0.8125rem; }
section.msg h3, section.item h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.7rem; margin: 0 0 0.35rem; font-size: 1rem; }
h3 .sf, h3 .nm { font-weight: 700; }
h3 .mn { font-weight: 600; }
h3 .dir, h3 .fmt { color: var(--muted); font-size: 0.85rem; font-weight: 400; }

p.impl { margin: 0.25rem 0; font-size: 0.875rem; }
code { padding: 0.05rem 0.3rem; background: var(--code-bg); border-radius: 3px; font-size: 0.9em; }
.ok { color: var(--ok); }
.partial { color: var(--warn); }
.no { color: var(--bad); }
p.gate { margin: 0.25rem 0; color: var(--warn); font-size: 0.875rem; }

pre.fmt {
  margin: 0.6rem 0;
  padding: 0.7rem 0.9rem;
  background: var(--code-bg);
  border-left: 3px solid var(--line);
  border-radius: 0 3px 3px 0;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.5;
}
pre.fmt a { text-decoration: none; border-bottom: 1px dotted currentColor; }
p.fmt.none {
  margin: 0.6rem 0;
  padding: 0.5rem 0.9rem;
  background: var(--code-bg);
  border-left: 3px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}
p.note { margin: 0.5rem 0; padding: 0.4rem 0.8rem; background: var(--panel); border-left: 3px solid var(--warn); font-size: 0.875rem; }
p.ref { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.8rem; }

p.desc { margin: 0.25rem 0; }
table.values { font-size: 0.85rem; }
table.values td.v { white-space: nowrap; }
p.used { margin: 0.5rem 0 0; font-size: 0.85rem; }
p.used .k { color: var(--muted); }
p.used a { display: inline-block; margin: 0.1rem 0.1rem 0 0; padding: 0.05rem 0.35rem; border: 1px solid var(--line); border-radius: 3px; font-size: 0.95em; text-decoration: none; }
p.used a:hover { background: var(--panel); }

/* 這個語言還沒有這段文字，畫面上看到的是退回中文的版本。 */
.untranslated { border-left-color: var(--bad); }
.untranslated::after { content: " [zh]"; color: var(--muted); font-size: 0.8em; }

footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.8rem; }
footer p { margin: 0.2rem 0; }

@media (max-width: 48rem) {
  html, body { height: auto; overflow: visible; }
  body { display: block; }
  nav.side { height: auto; overflow-y: visible; border-right: 0; border-bottom: 1px solid var(--line); }
  main { height: auto; overflow-y: visible; padding: 1.25rem 1rem 3rem; }
  main > * { max-width: none; }
  aside.pane { flex: 1 1 auto; height: auto; overflow-y: visible; border-left: 0; border-top: 1px solid var(--line); padding: 1.25rem 1rem 3rem; }
}

@media print {
  html, body { height: auto; overflow: visible; }
  body { display: block; }
  nav.side { display: none; }
  main { height: auto; overflow-y: visible; padding: 0; }
  main > * { max-width: none; }
  aside.pane { display: none; }
  section.msg, section.item { break-inside: avoid; }
}
