:root { --navy: #14263d; --navy2: #1e3a5c; --accent: #e8731a; --bg: #f5f7fa; --line: #e1e6ed; --text: #1c2733; --muted: #5f6d7c; --radius: 10px; }
* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); line-height: 1.6; }
a { color: var(--navy2); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

.bar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--navy); font-weight: 700; min-width: 0; }
.brand img { height: 30px; width: auto; }
.brand span { border-left: 2px solid var(--line); padding-left: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.langs { display: flex; border: 1px solid var(--line); border-radius: 99px; padding: 3px; background: var(--bg); flex-shrink: 0; }
.langs a { padding: .3rem .85rem; border-radius: 99px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .88rem; }
.langs a.on { background: var(--navy); color: #fff; }
.langs a:not(.on):hover { color: var(--navy); background: #fff; }

.hero { background: linear-gradient(135deg, var(--navy), var(--navy2)); color: #fff; padding: 3.2rem 0 3.6rem; }
.hero h1 { margin: 0 0 .4rem; font-size: 2.1rem; line-height: 1.2; }
.hero p { margin: 0 0 1.6rem; color: #cfd8e3; max-width: 640px; }
.search { display: flex; gap: .5rem; max-width: 640px; }
.search input { flex: 1; min-width: 0; font: inherit; padding: .75rem 1rem; border-radius: 8px; border: 0; }
.search input:focus { outline: 3px solid rgba(232,115,26,.6); }
.search button, .button { font: inherit; font-weight: 600; padding: .75rem 1.3rem; border-radius: 8px; border: 0; background: var(--accent); color: #fff; cursor: pointer; text-decoration: none; display: inline-block; }

main.wrap { padding-top: 2rem; padding-bottom: 3rem; }
.results { font-size: 1.15rem; }
.results small, .cat h2 small { color: var(--muted); font-weight: 400; font-size: .85rem; }
.empty { color: var(--muted); font-style: italic; }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.2rem; }
.cat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; border-top: 3px solid var(--accent); }
.cat h2 { margin: 0 0 .6rem; font-size: 1.15rem; color: var(--navy); display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.cat ul { list-style: none; margin: 0; padding: 0; }
.cat li + li { border-top: 1px solid var(--line); }
.cat li a { display: block; padding: .6rem 0; text-decoration: none; color: var(--text); }
.cat li a b { display: block; color: var(--navy2); font-weight: 600; }
.cat li a span { display: block; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.cat li a:hover b { text-decoration: underline; }

.article { max-width: 780px; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 1rem; }
.article h1 { font-size: 2rem; line-height: 1.25; margin: 0 0 .6rem; color: var(--navy); }
.lead { font-size: 1.15rem; color: var(--muted); margin: 0 0 1.5rem; }
.prose { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem 1.8rem; overflow-wrap: anywhere; }
.prose h2, .prose h3, .prose h4 { color: var(--navy); line-height: 1.3; margin: 1.6rem 0 .6rem; }
.prose > :first-child { margin-top: 0; }
.prose img { max-width: 100%; height: auto; border-radius: 6px; }
.prose .md-table { overflow-x: auto; margin: .8rem 0; }
.prose table { border-collapse: collapse; }
.prose th, .prose td { border: 1px solid var(--line); padding: .4rem .7rem; text-align: left; vertical-align: top; }
.prose th { background: var(--bg); }
.prose code { background: #f0f2f5; padding: .1rem .35rem; border-radius: 4px; font-size: .92em; }
.meta { color: var(--muted); font-size: .88rem; }
.related { margin-top: 2rem; }
.related h2 { font-size: 1.1rem; }

.foot { border-top: 1px solid var(--line); background: #fff; padding: 1.5rem 0; color: var(--muted); font-size: .92rem; }
.foot p { margin: .2rem 0; }
.foot .copy { font-size: .85rem; }

@media (max-width: 640px) {
    .langs a span, .brand span { display: none; }
    .hero { padding: 2.2rem 0 2.6rem; }
    .hero h1 { font-size: 1.6rem; }
    .search { flex-direction: column; }
    .prose { padding: 1.1rem; }
    .article h1 { font-size: 1.55rem; }
}
