/* 搬砖乐 — hand-written, no framework, system fonts. Look: 工地告示牌 — white, charcoal ink, brick red, safety yellow,
   square corners, a hazard stripe on top, keycaps for shortcuts. */
:root {
    --ink: #1c1f23;
    --muted: #646b75;
    --line: #e2e4e8;
    --soft: #f4f5f7;
    --bg: #fff;
    --brick: #c2412d;
    --brick-d: #9a2f1e;
    --hi: #ffd23f;
    --hi-soft: #fff3c4;
    --green: #17804a;
    --amber: #a86400;
    --red: #b42318;
    --blue: #2050b8;
    --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.75 var(--sans); }
a { color: var(--ink); text-decoration-color: rgba(28, 31, 35, .3); text-underline-offset: 3px; }
a:hover { color: var(--brick); text-decoration-color: var(--brick); }
mark { background: linear-gradient(transparent 55%, var(--hi) 55%); color: inherit; padding: 0 .1em; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
button { font: inherit; cursor: pointer; }

/* ---- top ---- */
.hazard { height: 6px; background: repeating-linear-gradient(-45deg, var(--hi) 0 14px, var(--ink) 14px 28px); }
.top { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 10; }
.top-in { display: flex; align-items: center; gap: 28px; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark { width: 30px; height: 24px; fill: var(--brick); }
.logo-mark rect:nth-child(3) { fill: var(--hi); }
.logo-cn { font-size: 1.35rem; font-weight: 800; letter-spacing: .06em; color: var(--ink); }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; padding: 6px 12px; font-weight: 600; color: var(--muted); }
.nav a:hover { color: var(--ink); }
.nav a[aria-current] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--brick); }
.top-search { margin-left: auto; display: flex; border: 1.5px solid var(--ink); height: 38px; }
.top-search input { border: 0; padding: 0 12px; width: 260px; font: inherit; font-size: .92rem; outline: none; background: #fff; }
.top-search button { border: 0; background: var(--ink); width: 42px; display: grid; place-items: center; }
.top-search svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.2; }

/* ---- hero ---- */
.hero { background: var(--soft); border-bottom: 1px solid var(--line); margin: 0 -20px; padding: 48px 20px 40px;
        background-image: linear-gradient(90deg, rgba(194, 65, 45, .06) 1px, transparent 1px), linear-gradient(rgba(194, 65, 45, .06) 1px, transparent 1px);
        background-size: 48px 24px; }
.hero-in { max-width: 820px; }
.hero-kicker { margin: 0 0 6px; font-weight: 700; color: var(--brick); letter-spacing: .12em; font-size: .9rem; }
.hero h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.2; letter-spacing: .02em; }
.hero-sub { color: var(--muted); font-size: 1.05rem; max-width: 640px; margin: 14px 0 22px; }
.hero-search { display: flex; border: 2px solid var(--ink); background: #fff; max-width: 720px; box-shadow: 5px 5px 0 var(--hi); }
.hero-search input { flex: 1; border: 0; padding: 14px 16px; font: inherit; font-size: 1.05rem; outline: none; min-width: 0; }
.hero-search button { border: 0; background: var(--brick); color: #fff; font-weight: 700; padding: 0 26px; font-size: 1.05rem; }
.hero-search button:hover { background: var(--brick-d); }
.hero-search.slim { box-shadow: none; margin: 0 0 28px; }
.chips { margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .92rem; }
.chips span { color: var(--muted); }
.chips a { text-decoration: none; border: 1px solid var(--ink); padding: 2px 10px; background: #fff; }
.chips a:hover { background: var(--ink); color: #fff; }

/* ---- layout ---- */
.page { padding: 32px 0 56px; }
.home, .guide-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; }
.side section { margin-bottom: 32px; }
.sec-h { font-size: 1.05rem; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--ink); display: flex; align-items: baseline; gap: 8px; }
.sec-h::before { content: ""; width: 10px; height: 10px; background: var(--brick); flex: none; transform: translateY(-1px); }
.sec-more { margin-left: auto; font-size: .85rem; font-weight: 400; text-decoration: none; color: var(--muted); }
.sec-n { font-family: var(--mono); color: var(--muted); font-weight: 400; }
.page-h { margin-bottom: 24px; }
.page-h h1 { font-size: 2rem; margin: 0 0 8px; line-height: 1.3; }
.page-h p { color: var(--muted); margin: 0; max-width: 720px; }
.page-sub { margin-top: 36px; }
.empty { color: var(--muted); padding: 20px; background: var(--soft); }
.more { display: inline-block; margin-top: 16px; font-weight: 600; }
.note { font-size: .85rem; color: var(--muted); margin-top: 24px; }

/* ---- guide lists ---- */
.glist { list-style: none; margin: 0; padding: 0; }
.glist li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.glist-t { font-size: 1.12rem; font-weight: 700; text-decoration: none; line-height: 1.5; }
.glist-s { margin: 6px 0 4px; color: #3a4048; font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.glist-m { margin: 0; font-size: .85rem; color: var(--muted); }
.glist-m a { color: var(--muted); }
.glist.compact li { padding: 12px 0; }
.glist.compact .glist-t { font-size: 1rem; }
.kind { display: inline-block; font-size: .75rem; font-weight: 700; padding: 0 6px; margin-right: 8px; line-height: 1.6; vertical-align: 2px; border: 1px solid; }
.kind-howto { color: var(--brick); border-color: var(--brick); }
.kind-tips { color: var(--blue); border-color: var(--blue); }
.kind-list { color: var(--green); border-color: var(--green); }
.kind-compare { color: var(--amber); border-color: var(--amber); }

.softs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.softs a { display: flex; justify-content: space-between; text-decoration: none; padding: 6px 10px; background: var(--soft); border-left: 3px solid var(--line); font-size: .92rem; }
.softs a:hover { border-left-color: var(--brick); background: var(--hi-soft); color: var(--ink); }
.softs b { font-weight: 400; color: var(--muted); }
.mini { list-style: none; margin: 0; padding: 0; }
.mini li { padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .95rem; line-height: 1.55; }
.mini small { display: block; color: var(--muted); font-size: .82rem; }

/* ---- scenes ---- */
.scenes { border-top: 1px solid var(--line); }
.scene-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.scene { padding: 18px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.scene h3 { margin: 0; font-size: 1.05rem; }
.scene h3 a { text-decoration: none; }
.scene > p { margin: 2px 0 10px; font-size: .85rem; }
.scene ul { list-style: none; padding: 0; margin: 0; font-size: .92rem; }
.scene li { padding: 2px 0; }

/* ---- tags ---- */
.price, .cn { display: inline-block; font-size: .75rem; padding: 0 6px; line-height: 1.7; white-space: nowrap; vertical-align: 1px; }
.price-free, .price-open_source { background: #e3f4ea; color: var(--green); }
.price-freemium { background: #e8eefb; color: var(--blue); }
.price-paid { background: #fdeceb; color: var(--red); }
.cn-direct { color: var(--green); }
.cn-partial { color: var(--amber); }
.cn-vpn { color: var(--red); }
.cn-unknown { color: var(--muted); }
.stamp { display: inline-block; border: 1.5px solid var(--brick); color: var(--brick); font-size: .75rem; font-weight: 700; padding: 0 6px; line-height: 1.6; text-decoration: none; }
.stamp-sm { font-size: .7rem; padding: 0 4px; border-width: 1px; }

/* ---- guide page ---- */
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs span { margin: 0 6px; color: #b8bdc4; }
.guide h1 { font-size: clamp(1.6rem, 3.6vw, 2.1rem); line-height: 1.35; margin: 0 0 12px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; font-size: .88rem; color: var(--muted); margin-bottom: 22px; }
.meta .kind { margin: 0; }
.answer { border: 2px solid var(--ink); background: var(--hi-soft); padding: 16px 20px; margin-bottom: 26px; position: relative; }
.answer-h { position: absolute; top: -12px; left: 14px; margin: 0; background: var(--ink); color: var(--hi); font-size: .8rem; font-weight: 700; padding: 0 8px; letter-spacing: .1em; }
.answer p { margin: 4px 0; }
.answer .applies { font-size: .88rem; color: #4a4f57; margin-top: 8px; }
.toc { background: var(--soft); padding: 12px 20px; margin-bottom: 26px; border-left: 4px solid var(--brick); }
.toc p { margin: 0 0 4px; font-weight: 700; font-size: .9rem; }
.toc ol { margin: 0; padding-left: 1.4em; font-size: .95rem; }
.body { font-size: 1.04rem; }
.body h2 { font-size: 1.35rem; margin: 2em 0 .6em; padding-left: 12px; border-left: 5px solid var(--brick); line-height: 1.4; scroll-margin-top: 80px; }
.body h3 { font-size: 1.12rem; margin: 1.6em 0 .4em; }
.body p { margin: .8em 0; }
.body ol, .body ul { padding-left: 1.6em; margin: .8em 0; }
.body ol { counter-reset: step; list-style: none; padding-left: 0; }
.body ol > li { counter-increment: step; position: relative; padding: 8px 0 8px 44px; border-bottom: 1px dashed var(--line); }
.body ol > li::before { content: counter(step); position: absolute; left: 0; top: 9px; width: 28px; height: 28px; display: grid; place-items: center;
                        background: var(--ink); color: var(--hi); font-family: var(--mono); font-weight: 700; font-size: .9rem; }
.body ul > li { margin: 4px 0; }
.body ul > li::marker { color: var(--brick); }
.body strong { font-weight: 700; background: linear-gradient(transparent 62%, var(--hi-soft) 62%); }
.body code, .faq code { font-family: var(--mono); font-size: .88em; background: var(--soft); border: 1px solid var(--line); padding: 1px 5px; word-break: break-all; }
.body pre { background: #1f2329; color: #f2f3f5; padding: 14px 16px; overflow-x: auto; font-size: .9rem; line-height: 1.6; border-left: 5px solid var(--hi); }
.body pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; word-break: normal; }
.keys { white-space: nowrap; }
.keys i { font-style: normal; color: var(--muted); margin: 0 2px; font-size: .85em; }
kbd { font-family: var(--mono); font-size: .82em; display: inline-block; min-width: 1.8em; text-align: center; padding: 0 6px; line-height: 1.7;
      background: #fff; border: 1px solid #b9bec6; border-bottom-width: 3px; color: var(--ink); }
.tip { background: #eef3fd; border-left: 4px solid var(--blue); padding: 10px 14px; margin: 1em 0; font-size: .97rem; }
.tbl { overflow-x: auto; margin: 1em 0; }
.tbl table { border-collapse: collapse; width: 100%; font-size: .94rem; }
.tbl th, .tbl td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.tbl th { background: var(--soft); font-weight: 700; white-space: nowrap; }
.faq { margin-top: 40px; }
.faq h2 { font-size: 1.3rem; padding-left: 12px; border-left: 5px solid var(--brick); }
.faq details { border-bottom: 1px solid var(--line); padding: 10px 0; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq summary::marker { color: var(--brick); }
.faq details p { margin: 8px 0 0; color: #3a4048; }
.vote { margin-top: 40px; padding: 20px; background: var(--soft); }
.vote > p:first-child { margin: 0 0 10px; font-weight: 700; }
.vote form { display: flex; gap: 10px; flex-wrap: wrap; }
.vote button { border: 2px solid var(--ink); background: var(--ink); color: #fff; padding: 6px 18px; font-weight: 600; }
.vote button.btn-line, .btn-line { background: #fff; color: var(--ink); border: 1.5px solid var(--ink); padding: 6px 16px; }
.vote .small { margin: 14px 0 0; }

.tcards { list-style: none; margin: 0; padding: 0; }
.tcards li { border: 1px solid var(--line); padding: 12px 14px; margin-bottom: 10px; }
.tcards li:first-child { border-color: var(--ink); box-shadow: 3px 3px 0 var(--hi); }
.tc-name { font-weight: 700; margin-right: 6px; }
.tcards p { margin: 4px 0 0; font-size: .9rem; }

/* ---- tools ---- */
.tools-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; }
.cat-nav h3 { font-size: .85rem; color: var(--muted); margin: 0 0 8px; letter-spacing: .1em; }
.cat-nav ul { list-style: none; margin: 0; padding: 0; position: sticky; top: 80px; }
.cat-nav a { display: flex; justify-content: space-between; padding: 6px 10px; text-decoration: none; border-left: 3px solid transparent; font-size: .95rem; }
.cat-nav a b { font-weight: 400; color: var(--muted); }
.cat-nav a[aria-current] { border-left-color: var(--brick); background: var(--hi-soft); font-weight: 700; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 18px; font-size: .9rem; }
.filters span { color: var(--muted); margin: 0 4px 0 10px; }
.filters span:first-child { margin-left: 0; }
.filters a { text-decoration: none; padding: 2px 10px; border: 1px solid var(--line); }
.filters a[aria-current] { background: var(--ink); color: #fff; border-color: var(--ink); }
.cat-block { margin-bottom: 32px; }
.cat-block h2 { font-size: 1.15rem; margin: 0 0 6px; padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
.cat-block h2 a { text-decoration: none; }
.cat-block h2 small { font-weight: 400; font-size: .85rem; margin-left: 8px; }
.tlist { list-style: none; margin: 0; padding: 0; }
.trow { display: flex; gap: 16px; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); }
.trow.down { opacity: .6; }
.trow-name { font-weight: 700; font-size: 1.05rem; }
.trow-g { font-size: .8rem; margin-left: 8px; color: var(--brick); text-decoration: none; }
.trow p { margin: 2px 0 0; font-size: .93rem; }
.trow-tags { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }

.card { border: 2px solid var(--ink); padding: 22px 24px; box-shadow: 6px 6px 0 var(--hi); }
.card h1 { margin: 0; font-size: 2rem; line-height: 1.3; }
.lead { margin: 6px 0 16px; font-size: 1.08rem; color: #3a4048; }
.fields { display: grid; grid-template-columns: 90px 1fr; gap: 8px 12px; margin: 0 0 18px; font-size: .95rem; }
.fields dt { color: var(--muted); }
.fields dd { margin: 0; }
.go { display: inline-block; background: var(--brick); color: #fff; text-decoration: none; padding: 8px 20px; font-weight: 700; }
.go:hover { background: var(--brick-d); color: #fff; }
.changes { list-style: none; margin: 0; padding: 0; font-size: .88rem; }
.changes li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.changes time { font-family: var(--mono); color: var(--muted); margin-right: 6px; }

/* ---- prose / forms / admin ---- */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.3rem; margin-top: 2em; padding-left: 12px; border-left: 5px solid var(--brick); }
.login { max-width: 360px; margin: 40px auto; display: grid; gap: 8px; }
.login input { padding: 8px 10px; font: inherit; border: 1.5px solid var(--ink); }
.login button { margin-top: 10px; padding: 8px; border: 0; background: var(--ink); color: #fff; }
.admin-h { display: flex; justify-content: space-between; align-items: flex-start; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 12px; }
.stat { border: 1.5px solid var(--ink); padding: 10px 14px; }
.stat b { display: block; font-family: var(--mono); font-size: 1.6rem; }
.stat span { font-size: .82rem; color: var(--muted); }
.stat.bad { border-color: var(--red); color: var(--red); }
.alerts { border: 2px solid var(--red); padding: 12px 18px; margin: 20px 0; }
.alerts h2 { margin: 0 0 8px; font-size: 1.05rem; color: var(--red); }
.log { width: 100%; border-collapse: collapse; font-size: .88rem; }
.log td { border-bottom: 1px solid var(--line); padding: 6px 8px; vertical-align: top; }
.log td.t { white-space: nowrap; font-family: var(--mono); color: var(--muted); }
.log tr.fail td { color: var(--red); }
.log pre { white-space: pre-wrap; margin: 4px 0; }
.log-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; }
form.inline { display: inline; }
button.link { border: 0; background: none; color: var(--blue); padding: 0 4px; font-size: .85rem; text-decoration: underline; }
.pager { display: flex; justify-content: space-between; margin-top: 24px; }

/* ---- footer ---- */
.foot { border-top: 6px solid var(--ink); background: var(--soft); padding: 32px 0 40px; font-size: .9rem; }
.foot-in { display: flex; gap: 48px; justify-content: space-between; }
.foot-about { max-width: 720px; }
.foot-logo { font-weight: 800; font-size: 1.1rem; margin: 0 0 6px; }
.foot-logo .mono { font-weight: 400; color: var(--muted); font-size: .85rem; margin-left: 6px; }
.foot-links { list-style: none; margin: 0; padding: 0; }
.foot-links li { margin: 4px 0; }

/* ---- small screens ---- */
/* ---- 平台和版本：Windows / Mac 切换、版本标签、分段 ---- */
.os-win .km, .os-mac .kw { display: none; }                       /* [[Ctrl+C|Command+C]] shows the reader's keys */
.os { display: inline-block; font-size: .7rem; font-weight: 700; line-height: 1.5; padding: 0 5px; margin-left: 6px; vertical-align: 2px; background: var(--soft); color: var(--muted); border: 1px solid var(--line); }
.osswitch { display: flex; align-items: center; gap: 0; margin: 0 0 22px; font-size: .9rem; }
.osswitch span { margin-right: 10px; color: var(--muted); }
.osswitch a { padding: 5px 16px; border: 2px solid var(--ink); color: var(--ink); text-decoration: none; font-weight: 700; background: #fff; }
.osswitch a + a { border-left: 0; }
.osswitch a.on { background: var(--ink); color: var(--hi); }
.osnote { background: var(--soft); padding: 8px 12px; font-size: .9rem; margin: 0 0 18px; }
.osblock .vt { position: absolute; opacity: 0; pointer-events: none; }
.vlabels { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 18px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.vlabels span { font-size: .85rem; color: var(--muted); margin-right: 4px; }
.vlabels label { cursor: pointer; padding: 4px 12px; border: 1px solid var(--line); background: var(--soft); font-size: .9rem; }
.vlabels label:hover { border-color: var(--ink); }
.osblock .vt:focus-visible + .vt, .osblock .vt:focus-visible { outline: none; }
.vpanel { display: none; }
.osblock > .vpanel:only-of-type { display: block; }
.vt:nth-of-type(1):checked ~ .vpanel:nth-of-type(1), .vt:nth-of-type(2):checked ~ .vpanel:nth-of-type(2),
.vt:nth-of-type(3):checked ~ .vpanel:nth-of-type(3), .vt:nth-of-type(4):checked ~ .vpanel:nth-of-type(4),
.vt:nth-of-type(5):checked ~ .vpanel:nth-of-type(5), .vt:nth-of-type(6):checked ~ .vpanel:nth-of-type(6) { display: block; }
.vt:nth-of-type(1):checked ~ .vlabels label:nth-of-type(1), .vt:nth-of-type(2):checked ~ .vlabels label:nth-of-type(2),
.vt:nth-of-type(3):checked ~ .vlabels label:nth-of-type(3), .vt:nth-of-type(4):checked ~ .vlabels label:nth-of-type(4),
.vt:nth-of-type(5):checked ~ .vlabels label:nth-of-type(5), .vt:nth-of-type(6):checked ~ .vlabels label:nth-of-type(6) { background: var(--ink); color: var(--hi); border-color: var(--ink); }
.vt:nth-of-type(1):focus-visible ~ .vlabels label:nth-of-type(1), .vt:nth-of-type(2):focus-visible ~ .vlabels label:nth-of-type(2),
.vt:nth-of-type(3):focus-visible ~ .vlabels label:nth-of-type(3), .vt:nth-of-type(4):focus-visible ~ .vlabels label:nth-of-type(4),
.vt:nth-of-type(5):focus-visible ~ .vlabels label:nth-of-type(5), .vt:nth-of-type(6):focus-visible ~ .vlabels label:nth-of-type(6) { outline: 2px solid var(--brick); outline-offset: 2px; }
.vhead { border-left: 4px solid var(--hi); background: var(--soft); padding: 10px 16px; margin-bottom: 22px; }
.vfor { margin: 0 0 4px; font-size: .85rem; font-weight: 700; color: var(--brick-d); }
.vfor .muted { font-weight: 400; margin-left: 4px; }
.vanswer { margin: 0; }
.vmissing { border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 24px; }

@media (max-width: 900px) {
    .home, .guide-grid, .tools-layout, .log-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .top-search input { width: 160px; }
    .cat-nav ul { position: static; display: flex; overflow-x: auto; gap: 4px; padding-bottom: 6px; }
    .cat-nav a { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; }
    .cat-nav a[aria-current] { border-bottom-color: var(--brick); }
    .cat-nav h3 { display: none; }
}
@media (max-width: 640px) {
    .wrap { padding: 0 16px; }
    .hero { margin: 0 -16px; padding: 32px 16px 28px; }
    .top-in { gap: 12px; flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 4px; }
    .nav { order: 3; width: 100%; margin-left: -12px; }
    .top-search { margin-left: auto; }
    .top-search input { width: 120px; }
    .hero-search button { padding: 0 14px; }
    .foot-in { flex-direction: column; gap: 16px; }
    .trow { flex-direction: column; gap: 6px; }
    .trow-tags { flex-direction: row; align-items: center; }
    .body ol > li { padding-left: 38px; }
    .card { padding: 18px; }
}
