/* ================= Pi 教程栏目（由 sync.py 生成，勿手改） ================= */
.tut-nav-link.is-on { color: #2563eb !important; }
.tut-container { max-width: 900px; }
.tut-crumb { font-size: 13.4px; color: #8496ad; margin-bottom: 20px; }
.tut-crumb a { color: #5b6b85; text-decoration: none !important; }
.tut-crumb a:hover { color: #2563eb; }
.tut-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.tut-card { display: flex; flex-direction: column; background: #fff; border: 1px solid #e6ecf5;
  border-radius: 16px; overflow: hidden; text-decoration: none !important;
  box-shadow: 0 20px 46px -38px rgba(16,42,80,.55); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.tut-card:hover { transform: translateY(-5px); border-color: #cddcf8; box-shadow: 0 30px 56px -36px rgba(37,99,235,.55); }
.tut-thumb { position: relative; width: 100%; aspect-ratio: 16 / 10; background: #f1f5fb; overflow: hidden; }
.tut-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.tut-card:hover .tut-thumb img { transform: scale(1.04); }
.tut-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.tut-body h3 { font-size: 16px; font-weight: 750; color: #102a50; line-height: 1.55; margin: 0 0 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tut-card:hover .tut-body h3 { color: #2563eb; }
.tut-body p { font-size: 13px; line-height: 1.85; color: #8496ad; margin: 0 0 14px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tut-meta { display: flex; align-items: center; gap: 12px; font-size: 12.4px; color: #8496ad; }
.tut-meta i { color: #2563eb; margin-right: 4px; }
.tut-more { text-align: center; margin-top: 34px; }
.tut-article { background: #fff; border: 1px solid #e6ecf5; border-radius: 18px; padding: 34px 38px 30px;
  box-shadow: 0 24px 60px -46px rgba(16,42,80,.5); }
.tut-article > h1 { font-size: 27px; font-weight: 800; color: #102a50; line-height: 1.5; margin: 0 0 16px; }
.tut-article .tut-info { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; font-size: 13px;
  color: #8496ad; padding-bottom: 18px; border-bottom: 1px dashed #e6ecf5; margin-bottom: 22px; }
.tut-content { font-size: 15.5px; line-height: 2.05; color: #33455f; word-break: break-word; }
.tut-content p { margin: 0 0 16px; }
.tut-content img { max-width: 100% !important; height: auto !important; border-radius: 12px; margin: 8px 0; display: block; }
.tut-content iframe { max-width: 100%; width: 100%; border-radius: 12px; background: #0b1220; }
.tut-content h2, .tut-content h3 { color: #102a50; font-weight: 750; margin: 26px 0 12px; }
.tut-content a { color: #2563eb; }
.tut-content table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.tut-content td, .tut-content th { border: 1px solid #e6ecf5; padding: 8px 10px; font-size: 14px; }
.tut-tags { margin-top: 26px; padding-top: 18px; border-top: 1px dashed #e6ecf5; font-size: 13px; color: #8496ad; }
.tut-tags span { display: inline-block; margin: 0 6px 6px 0; padding: 4px 11px; border-radius: 999px;
  background: #eaf1ff; color: #2563eb; font-weight: 650; }
.tut-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.tut-pager a { background: #fff; border: 1px solid #e6ecf5; border-radius: 14px; padding: 14px 18px;
  text-decoration: none !important; color: #33455f; font-size: 14px; line-height: 1.6;
  box-shadow: 0 16px 36px -34px rgba(16,42,80,.5); transition: border-color .16s ease, color .16s ease; }
.tut-pager a:hover { border-color: #cddcf8; color: #2563eb; }
.tut-pager a small { display: block; font-size: 12px; color: #8496ad; margin-bottom: 4px; }
.tut-pager .ph { visibility: hidden; }
.tut-cta { margin-top: 22px; background: linear-gradient(96deg, #2563eb, #4f46e5); border-radius: 16px;
  padding: 22px 26px; color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.tut-cta b { font-size: 16.5px; font-weight: 750; }
.tut-cta span { font-size: 13px; opacity: .86; display: block; margin-top: 6px; }
.tut-cta a { flex: 0 0 auto; background: #fff; color: #2563eb !important; font-weight: 700; font-size: 14px;
  border-radius: 999px; padding: 12px 24px; text-decoration: none !important; }
/* ---- 教程搜索（视觉对齐 /tools/ 的 .tl-search，见 server.py） ---- */
.tut-bar { position: sticky; top: 0; z-index: 20; background: rgba(247,249,252,.94); backdrop-filter: blur(8px);
  padding: 14px 0; margin: 0 0 24px; border-bottom: 1px solid #e6ecf5; }
.tut-bar-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tut-search { position: relative; flex: 1 1 260px; max-width: 420px; }
.tut-search input { width: 100%; height: 44px; border-radius: 12px; border: 1px solid #e6ecf5; background: #fff;
  padding: 0 16px 0 42px; font-size: 14.5px; color: #102a50; outline: none;
  transition: border-color .16s ease, box-shadow .16s ease; }
.tut-search input::placeholder { color: #a4b2c6; }
.tut-search input:focus { border-color: #9dbcf5; box-shadow: 0 0 0 4px rgba(37,99,235,.1); }
.tut-search > svg { position: absolute; left: 14px; top: 13px; width: 18px; height: 18px; fill: #8496ad; pointer-events: none; }
.tut-count { margin-left: auto; font-size: 13.4px; color: #8496ad; white-space: nowrap; }
.tut-count b { color: #2563eb; font-weight: 750; }
.tut-empty { display: none; text-align: center; padding: 58px 20px 66px; color: #8496ad; }
.tut-empty.is-on { display: block; }
.tut-empty svg { width: 46px; height: 46px; fill: #cbd8ea; margin-bottom: 14px; }
.tut-empty p { font-size: 14.5px; line-height: 1.9; margin: 0; }
.tut-empty em { font-style: normal; color: #2563eb; font-weight: 650; }
@media (max-width: 991.98px) {
  .tut-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tut-article { padding: 26px 22px 24px; }
  .tut-article > h1 { font-size: 22px; }
}
@media (max-width: 575.98px) {
  .tut-grid { grid-template-columns: 1fr; }
  .tut-pager { grid-template-columns: 1fr; }
  .tut-content { font-size: 15px; line-height: 1.95; }
  .tut-search { flex: 1 1 100%; max-width: none; }
  .tut-count { margin-left: 0; }
}
