:root {
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --link: #2563eb;
  --soft: #f8fafc;
  --free: #059669;
  --bg: #fff;
  --max: 1080px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font: 16px/1.65 "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.skip {
  position: absolute; left: -999px;
}
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 6px 10px; }
.wrap { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; }
.top { position: sticky; top: 0; background: #fff; border-bottom: 1px solid var(--line); z-index: 5; }
.bar { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; display: flex; align-items: center; gap: 18px; min-height: 64px; }
.brand { display: flex; gap: 10px; align-items: center; color: var(--text); text-decoration: none; }
.brand strong, .brand em { display: block; font-style: normal; }
.brand em { color: var(--muted); font-size: 12px; }
.logo, .mark {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: #2563eb; color: #fff; font-weight: 700; flex: none;
}
.menu { display: flex; gap: 16px; flex-wrap: wrap; }
.menu a { color: #374151; }
.menu a[aria-current="page"] { color: var(--link); font-weight: 700; }
.login { margin-left: auto; color: #374151; }
.hero { padding: 42px 0 10px; text-align: center; }
h1 { font-size: 34px; line-height: 1.25; margin: 0 0 12px; }
h2 { font-size: 20px; margin: 22px 0 8px; }
h3 { font-size: 17px; margin: 16px 0 6px; }
.lead { color: #374151; margin: 0 auto 16px; max-width: 760px; }
.search { display: flex; gap: 8px; max-width: 640px; margin: 0 auto; }
.search input, .form input, .form textarea, .form select {
  width: 100%; border: 1px solid #d1d5db; border-radius: 10px; padding: 12px 14px; font: inherit;
}
.search button, .form button, .go, button {
  border: 0; background: #111827; color: #fff; border-radius: 10px; padding: 12px 18px; font: inherit; cursor: pointer;
}
.stats { color: var(--muted); }
.chips { display: flex; gap: 8px; overflow: auto; padding: 14px 0 6px; }
.chips a, .subtags a, .tags a {
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; color: #1d4ed8; background: #fff; white-space: nowrap;
}
.sheet { display: grid; grid-template-columns: 1fr 260px; gap: 28px; padding-bottom: 40px; }
.sec { margin-top: 8px; }
.feed { display: flex; flex-direction: column; }
.tool { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.tool h2 { font-size: 18px; margin: 0 0 4px; }
.tool h2 a { color: var(--text); }
.tool p { margin: 0; color: #4b5563; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px !important; }
.pill { display: inline-block; margin-left: 6px; border-radius: 999px; padding: 0 8px; font-size: 12px; border: 1px solid var(--line); color: #374151; vertical-align: 1px; }
.pill.free { color: var(--free); border-color: #a7f3d0; background: #ecfdf5; }
.pill.pick { color: #b45309; border-color: #fde68a; background: #fffbeb; }
.side, .side-nav { background: var(--soft); border-radius: 14px; padding: 14px 16px; }
.side ol { margin: 8px 0 8px 18px; padding: 0; }
.side-nav { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 96px); overflow: auto; }
.side-nav a { display: block; color: #374151; padding: 6px 10px; border-radius: 8px; }
.side-nav a[aria-current="page"] { color: #5b21b6; font-weight: 700; background: #ede9fe; text-decoration: none; }
.wide { width: min(1180px, calc(100% - 32px)); }
.l2-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.l2-chips a { border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; color: var(--text); background: #fff; }
.l2-chips a[aria-current="page"] { background: #ede9fe; color: #5b21b6; border-color: #ddd6fe; text-decoration: none; }
.l2-chips b { color: #6d28d9; font-weight: 700; }
.l2-block { padding: 16px 0 8px; border-bottom: 1px solid var(--line); }
.l2-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.l2-head h2 { margin: 0; font-size: 18px; }
.l2-head h2 a { color: var(--text); }
.l2-head .count { color: #6d28d9; font-weight: 700; }
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.pcard { display: block; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: inherit; background: #fff; }
.pcard strong { display: block; color: var(--text); }
.pcard em { font-style: normal; color: var(--free); font-size: 12px; margin-left: 6px; }
.pcard span { display: block; color: var(--muted); font-size: 14px; margin-top: 4px; }
.pcard:hover { text-decoration: none; border-color: #c4b5fd; }
.more-row { margin: 10px 0 0; }
.page { padding: 24px 0 48px; }
.narrow { max-width: 820px; }
.crumb { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.cat-layout { display: grid; grid-template-columns: 220px 1fr; gap: 28px; }
.group { padding: 8px 0 18px; border-bottom: 1px solid var(--line); }
.subtags { display: flex; flex-wrap: wrap; gap: 8px; }
.subtags b { color: var(--muted); font-weight: 600; }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.card { display: block; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; color: inherit; }
.card h2 { margin-top: 0; }
.card p, .empty, .meta { color: var(--muted); }
.prose p { margin: 0 0 12px; }
.form { display: grid; gap: 12px; max-width: 720px; }
.form label { display: grid; gap: 6px; font-weight: 600; }
.check { grid-template-columns: 18px 1fr; align-items: center; }
.hp { position: absolute; left: -9999px; }
.ok { color: var(--free); }
.err { color: #b91c1c; }
.pager { display: flex; gap: 12px; align-items: center; margin-top: 16px; }
.tabs { display: flex; gap: 12px; }
.more { color: var(--muted); }
.foot { border-top: 1px solid var(--line); padding: 28px 0 18px; background: var(--soft); }
.foot-grid { display: grid; grid-template-columns: 1.4fr .8fr; gap: 20px; }
.foot nav { display: grid; gap: 6px; }
.legal { width: min(var(--max), calc(100% - 32px)); margin: 16px auto 0; color: var(--muted); font-size: 13px; display: flex; gap: 12px; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--line); text-align: left; padding: 8px 6px; vertical-align: top; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.plain { padding-left: 18px; }
@media (max-width: 800px) {
  h1 { font-size: 26px; }
  .bar { flex-wrap: wrap; padding: 8px 0; }
  .login { margin-left: 0; }
  .sheet, .cat-layout, .cards, .product-grid, .foot-grid { grid-template-columns: 1fr; }
  .side-nav { position: static; max-height: none; flex-direction: row; overflow: auto; }
  .search { flex-direction: column; }
}
