/* WPToolkit 首页：标题区、搜索、分类条、最近使用、末行占位图块、空结果 */
.wptk-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px 32px;
  align-items: end;
  padding: 28px 32px;
  border: 1px solid var(--wptk-line);
  border-radius: var(--wptk-radius-l);
  background: var(--wptk-surface);
}
.wptk-hero .wptk-title { font-size: 28px; }
.wptk-facts {
  display: flex;
  gap: 28px;
  margin: 0;
}
.wptk-facts div { display: flex; flex-direction: column; }
.wptk-facts dt { order: 2; color: var(--wptk-subtle); font-size: 12.5px; }
.wptk-facts dd {
  order: 1;
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  color: var(--wptk-text);
}
.wptk-search {
  grid-column: 1 / -1;
  position: relative;
  display: flex;
  align-items: center;
  margin: 0;
}
.wptk-search svg.wptk-i {
  position: absolute;
  left: 14px;
  color: var(--wptk-subtle);
  pointer-events: none;
}
.wptk-search input {
  width: 100%;
  height: 48px;
  padding: 0 52px 0 44px;
  border: 1px solid var(--wptk-border);
  border-radius: var(--wptk-radius-l);
  background: var(--wptk-sunken);
  color: var(--wptk-text);
  font: inherit;
  font-size: 16px;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.wptk-search input:focus {
  outline: none;
  border-color: var(--wptk-accent);
  background: var(--wptk-surface);
  box-shadow: var(--wptk-ring);
}
.wptk-search input::-webkit-search-cancel-button { display: none; }
.wptk-search kbd {
  position: absolute;
  right: 12px;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border: 1px solid var(--wptk-border);
  border-radius: 5px;
  background: var(--wptk-surface);
  color: var(--wptk-subtle);
  font-size: 12px;
  line-height: 22px;
  text-align: center;
}
.wptk-cats {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.wptk-cats::-webkit-scrollbar { display: none; }
.wptk-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  flex: none;
  border: 1px solid var(--wptk-line);
  border-radius: 17px;
  background: var(--wptk-surface);
  color: var(--wptk-muted);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  transition: border-color .15s, color .15s, background-color .15s;
}
.wptk-chip:hover { border-color: var(--wptk-border); color: var(--wptk-text); }
.wptk-chip b { font-weight: 500; color: var(--wptk-subtle); font-variant-numeric: tabular-nums; }
.wptk-chip[aria-pressed="true"] {
  border-color: var(--wptk-text);
  background: var(--wptk-text);
  color: var(--wptk-surface);
}
.wptk-chip[aria-pressed="true"] b { color: inherit; opacity: .7; }
.wptk-recent-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  margin-left: auto;
  padding-left: 12px;
  color: var(--wptk-muted);
  font-size: 13px;
}
.wptk-recent-label svg.wptk-i { width: 15px; height: 15px; }
.wptk-chip.is-link { color: var(--wptk-muted); text-decoration: none; }
.wptk-chip.is-link:hover { color: var(--wptk-accent-text); }
.wptk-chip.is-link svg.wptk-i { width: 15px; height: 15px; }
.wptk-fill {
  --c: var(--wptk-cat-dev);
  display: none;
  position: relative;
  overflow: hidden;
  min-height: 120px;
  border: 1px dashed var(--wptk-line);
  background: var(--wptk-surface);
  border: 1px dashed color-mix(in srgb, var(--c) 22%, var(--wptk-line));
  border-radius: var(--wptk-radius-l);
  background:
    radial-gradient(color-mix(in srgb, var(--c) 22%, transparent) 1px, transparent 1.4px) 0 0 / 14px 14px,
    linear-gradient(135deg, color-mix(in srgb, var(--c) 7%, var(--wptk-surface)), var(--wptk-surface) 70%);
}
.wptk-fill svg.wptk-i { position: absolute; right: -14px; bottom: -18px; width: 112px; height: 112px; color: var(--c); opacity: .12; transform: rotate(-12deg); }
.wptk-fill.is-img { border-style: solid; border-color: var(--wptk-line); background: var(--wptk-sunken); }
.wptk-fill.is-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
a.wptk-fill { transition: border-color .15s, box-shadow .15s; }
a.wptk-fill:hover { border-color: var(--wptk-border); box-shadow: var(--wptk-shadow-hover, 0 4px 14px rgba(0, 0, 0, .08)); }
a.wptk-fill:focus-visible { outline: 2px solid var(--wptk-accent); outline-offset: 2px; }
.wptk-fill[data-cat="text"] { --c: var(--wptk-cat-text); }
.wptk-fill[data-cat="network"] { --c: var(--wptk-cat-network); }
.wptk-fill[data-cat="linux"] { --c: var(--wptk-cat-linux); }
.wptk-fill[data-cat="web"] { --c: var(--wptk-cat-web); }
.wptk-fill[data-cat="image"] { --c: var(--wptk-cat-image); }
.wptk-fill[data-cat="life"] { --c: var(--wptk-cat-life); }
@media (min-width: 992px) {
  .wptk-fill.is-3 { display: block; }
}
@media (min-width: 768px) and (max-width: 991px) {
  .wptk-fill.is-2 { display: block; }
}
.wptk-home.is-searching .wptk-fill { display: none; }
.wptk-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 48px 16px;
  border: 1px solid var(--wptk-line);
  border-radius: var(--wptk-radius-l);
  background: var(--wptk-surface);
  color: var(--wptk-muted);
  text-align: center;
}
.wptk-empty svg.wptk-i { width: 32px; height: 32px; color: var(--wptk-subtle); }
@media (max-width: 767px) {
  .wptk-hero .wptk-title { font-size: 22px; }
  .wptk-hero { grid-template-columns: minmax(0, 1fr); padding: 20px 16px; gap: 16px; }
  .wptk-facts { gap: 20px; }
  .wptk-facts dd { font-size: 20px; }
  .wptk-recent-label { margin-left: 4px; padding-left: 12px; border-left: 1px solid var(--wptk-line); }
}
