@import url('/readable-fonts.css');

:root, :root:not([data-theme="dark"]) {
  color-scheme: dark;
  --bg: #090c09; --fg: #f4f6ee; --text: #f4f6ee; --muted: #b6bfb3;
  --mut: #b6bfb3; --line: #353d32; --line2: #64735a; --bd: #353d32;
  --card: #171d15; --panel: #171d15; --raised: #20271c;
  --acc: #9dff00; --accent: #9dff00; --lime: #9dff00;
  --code: #171d15; --ink: #090c09; --yes: #9dff00; --no: #8b9982;
}
* { box-sizing: border-box; scrollbar-color: #64735a var(--bg); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f4f6ee; --fg: #10160e; --text: #10160e; --muted: #4c5947;
    --mut: #4c5947; --line: #b2bdaa; --line2: #64735a; --bd: #b2bdaa;
    --card: #e8ede2; --panel: #e8ede2; --raised: #dde5d5;
    --acc: #336709; --accent: #336709; --lime: #336709;
    --code: #e8ede2; --ink: #fff; --yes: #336709; --no: #64735a;
  }
}
html { scroll-padding-top: 32px; scroll-behavior: auto; }
html body { margin: 0; background: var(--bg); color: var(--fg); font: 18px/1.8 Manrope, "Noto Sans SC", "Microsoft YaHei", sans-serif; }
body main, body .wrap { width: min(100% - 48px, 900px); max-width: 900px; margin: 0 auto; padding: 48px 0 80px; }
body .wrap { max-width: 1200px; width: min(100% - 48px, 1200px); }
body main > p, body .wrap > p { max-width: 75ch; }
h1, h2, h3 { font-family: inherit; text-wrap: balance; letter-spacing: -.025em; line-height: 1.3; font-weight: 600; }
body h1 { color: var(--fg); font-size: clamp(36px, 4vw, 52px); margin: 0 0 24px; }
body h2 { font-size: 29px; margin: 44px 0 20px; border: 0; }
body h3 { font-size: 23px; margin: 28px 0 16px; }
body p { margin-block: 16px; }
body a { color: var(--lime); text-underline-offset: 5px; overflow-wrap: anywhere; }
a:hover { text-decoration: underline; }
a, button, input, summary { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
::selection { color: var(--bg); background: var(--lime); }
button, input, select { font: inherit; min-height: 44px; }
input { caret-color: var(--lime); }
body pre, body code { font-family: Consolas, "Courier New", monospace; font-size: 16px; font-variant-ligatures: none; }
body pre { max-width: 100%; overflow: auto; padding: 20px; line-height: 1.8; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
body code { overflow-wrap: anywhere; }
body b.ui { white-space: normal; overflow-wrap: anywhere; }
body main, body .wrap { overflow-wrap: break-word; }
body pre code { overflow-wrap: normal; }
body table { max-width: 100%; font-size: 16px; font-variant-numeric: tabular-nums; }
body main > table { display: block; overflow: auto; width: 100%; border: 1px solid var(--line); border-radius: 8px; }
body td, body th { padding: 14px 16px; border: 0; border-bottom: 1px solid var(--line); }
body th { color: var(--muted); font-size: 16px; }
body table code { font-size: 15px; }
body .sub, body .dlnote, body .cap, body .mut, body .muted { color: var(--muted); font-size: 16px; }
body .tablewrap { max-width: 100%; }
body .tablewrap table { font-size: 16px; }
body section.card { border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; padding: 28px 0 0; margin: 40px 0; }
body section.card h2 { margin-top: 0; }
body .dl { padding: 14px 24px; border-radius: 5px; font-size: 18px; }
body .dl small { font-size: 15px; opacity: 1; }
body nav.toc { gap: 12px 24px; margin-top: 32px; }
body nav.toc a { border: 0; border-radius: 0; background: none; border-bottom: 1px solid var(--line); font-size: 16px; padding: 8px 0; }
body .lang button { font-size: 16px; min-height: 44px; }
body .note, body .ok { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 16px 20px; }
body .tag { color: var(--lime); background: none; padding: 0; font-size: inherit; }
body .wiremap { overflow: auto; max-width: 100%; }
body .wiremap .sm, body .wiremap .pos, body .wiremap .bl { font-size: 15px; }
body .wiremap .dest b { font-size: 16px; }
body .wiremap .board, body .wiremap .dest { border-width: 1px; }
.readable-top { width: min(1200px, calc(100% - 48px)); margin: 0 auto; min-height: 90px; display: flex; align-items: center; gap: 32px; border-bottom: 1px solid var(--line); font-size: 16px; }
.readable-top a { text-decoration: none; color: var(--fg); min-height: 44px; display: inline-flex; align-items: center; }
.readable-top .readable-brand { margin-right: auto; font-size: 27px; font-weight: 800; letter-spacing: -.03em; }
.readable-brand span { color: var(--lime); }
.readable-top .readable-join { color: var(--lime); border: 1px solid var(--lime); border-radius: 5px; padding: 6px 18px; }
.readable-join:hover { background: var(--lime); color: var(--bg); }
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6ee; --fg: #10160e; --text: #10160e; --muted: #4c5947;
  --mut: #4c5947; --line: #b2bdaa; --line2: #64735a; --bd: #b2bdaa;
  --card: #e8ede2; --panel: #e8ede2; --raised: #dde5d5;
  --acc: #336709; --accent: #336709; --lime: #336709;
  --code: #e8ede2; --ink: #fff; --yes: #336709; --no: #64735a;
}
@media (max-width: 620px) {
  body main, body .wrap { width: calc(100% - 40px); padding-top: 32px; }
  body h1 { font-size: 36px; }
  body h2 { font-size: 27px; }
  body table.err th, body table.err td { font-size: 16px; }
  body .wiremap { padding-bottom: 12px; }
  body .wiremap > * { min-width: 500px; }
  .readable-top { width: calc(100% - 40px); gap: 20px; flex-wrap: wrap; padding-block: 16px; }
  .readable-top .readable-brand { font-size: 25px; }
  .readable-top a:nth-child(2) { display: none; }
}
