:root { --bg: #f6f1e7; --panel: #fffaf0; --ink: #2a2118; --muted: #6d5f4e; --line: #e2d6c2; --accent: #9a3d1d; --accent-2: #c9792e; --code: #efe6d6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #171310; --panel: #1f1a16; --ink: #ece2d3; --muted: #a8998a; --line: #3a3029; --accent: #e8925a; --accent-2: #d8a65a; --code: #2a231d; } }
:root[data-theme="dark"] { --bg: #171310; --panel: #1f1a16; --ink: #ece2d3; --muted: #a8998a; --line: #3a3029; --accent: #e8925a; --accent-2: #d8a65a; --code: #2a231d; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 Georgia, 'Iowan Old Style', 'Palatino Linotype', serif; }
a { color: var(--accent); }
header { position: sticky; top: 0; z-index: 5; background: var(--panel); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; max-width: 1200px; margin: 0 auto; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: bold; font-size: 20px; color: var(--ink); text-decoration: none; letter-spacing: .5px; }
.brand img { height: 34px; width: auto; filter: drop-shadow(0 0 5px rgba(40, 210, 220, .35)); }
.brand em { font-style: normal; color: var(--accent); }
.search { position: relative; flex: 1; min-width: 180px; max-width: 420px; margin-left: auto; }
.search input { width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); font: inherit; }
#results { position: absolute; left: 0; right: 0; top: 42px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; max-height: 60vh; overflow: auto; display: none; box-shadow: 0 8px 24px rgba(0,0,0,.15); }
#results a { display: block; padding: 8px 12px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
#results a small { display: block; color: var(--muted); }
nav.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 0 16px; max-width: 1200px; margin: 0 auto; scrollbar-width: thin; }
nav.tabs a { padding: 8px 12px; white-space: nowrap; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; font-family: system-ui, sans-serif; font-size: 14px; }
nav.tabs a.on { color: var(--accent); border-color: var(--accent); font-weight: 600; }
.layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; max-width: 1200px; margin: 0 auto; padding: 20px 16px 60px; }
aside { font-family: system-ui, sans-serif; font-size: 14px; }
aside h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin: 0 0 8px; }
aside a { display: block; padding: 5px 10px; border-radius: 6px; text-decoration: none; color: var(--ink); }
aside a.on { background: var(--code); color: var(--accent); font-weight: 600; }
aside .toc { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
aside .toc a { color: var(--muted); padding: 3px 10px; }
aside .toc a.l3 { padding-left: 22px; font-size: 13px; }
main { min-width: 0; }
main h1 { font-size: 32px; margin: 0 0 6px; line-height: 1.2; }
main h2 { margin-top: 32px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
main h3 { margin-top: 24px; }
.crumb { color: var(--muted); font-family: system-ui, sans-serif; font-size: 13px; }
.table { overflow-x: auto; margin: 12px 0; }
table { border-collapse: collapse; width: 100%; font-size: 14px; background: var(--panel); }
th, td { border: 1px solid var(--line); padding: 6px 9px; text-align: left; vertical-align: top; }
th { background: var(--code); font-family: system-ui, sans-serif; font-size: 13px; }
code { background: var(--code); padding: 1px 5px; border-radius: 4px; font-size: 90%; }
.muted { color: var(--muted); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.filters input, .filters select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); font: inherit; }
.filters input[type=search] { flex: 1; min-width: 200px; }
.map { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 16px 0; }
.cards a { display: block; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); }
.cards a strong { color: var(--accent); display: block; margin-bottom: 4px; }
.cards a span { color: var(--muted); font-size: 14px; }
footer { text-align: center; color: var(--muted); font: 13px system-ui, sans-serif; padding: 20px; border-top: 1px solid var(--line); }
#menu { display: none; font: 14px system-ui, sans-serif; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; color: var(--ink); }
@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; }
  aside { display: none; }
  aside.open { display: block; }
  #menu { display: inline-block; }
  main h1 { font-size: 26px; }
}
