:root {
  --brand: #4f46e5;
  --brand-strong: #4338ca;
  --brand-2: #06b6d4;
  --bg: #f5f7fb;
  --bg-soft: #eef2f9;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --border: #e6eaf3;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.12);
  --radius: 16px;
  --radius-sm: 12px;
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--ink);
  --bs-border-color: var(--border);
  --bs-link-color: var(--brand);
  --bs-link-hover-color: var(--brand-strong);
  --bs-primary: var(--brand);
}

[data-bs-theme="dark"] {
  --brand: #818cf8;
  --brand-strong: #a5b4fc;
  --brand-2: #22d3ee;
  --bg: #090f1c;
  --bg-soft: #0e1729;
  --card: #111c2f;
  --ink: #e5eaf3;
  --muted: #94a3b8;
  --border: #1e2c44;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.5);
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--ink);
  --bs-border-color: var(--border);
  --bs-secondary-color: #94a3b8;
}

* {
  scroll-behavior: smooth;
}

html,
body {
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 500px at 12% -10%, rgba(99, 102, 241, 0.1), transparent 60%),
    radial-gradient(800px 480px at 92% 0%, rgba(6, 182, 212, 0.09), transparent 60%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

a {
  text-decoration: none;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2000;
  background: var(--card);
  padding: 8px 14px;
  border-radius: 8px;
}

.text-gradient {
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: color-mix(in srgb, var(--card) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.navbar-brand {
  gap: 10px;
  padding: 0;
  margin: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.5px;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
  flex: 0 0 auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-weight: 800;
  font-size: 17px;
  color: var(--ink);
  letter-spacing: 0.2px;
}

.brand-sub {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.6px;
  color: var(--muted);
  text-transform: uppercase;
}

.navbar-nav .nav-link {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
  padding: 8px 12px !important;
  border-radius: 9px;
  transition: 0.18s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 9%, transparent);
}

.category-mega {
  width: 560px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  background: var(--card);
  margin-top: 10px !important;
}

.category-mega .dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink);
  border-radius: 8px;
  padding: 8px 10px;
}

.category-mega .dropdown-item i {
  color: var(--brand);
  font-size: 15px;
}

.category-mega .dropdown-item:hover {
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  color: var(--brand);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 240px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-soft);
  transition: 0.2s ease;
}

.header-search:focus-within {
  border-color: var(--brand);
  background: var(--card);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent);
}

.header-search i {
  color: var(--muted);
  font-size: 14px;
}

.header-search input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  color: var(--ink);
  font-size: 13.5px;
}

.header-search input::placeholder {
  color: var(--muted);
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  transition: 0.2s ease;
}

.theme-toggle:hover {
  color: var(--brand);
  border-color: var(--brand);
}

.offcanvas {
  background: var(--card);
  color: var(--ink);
}

.mobile-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mobile-links a {
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--ink);
  font-weight: 500;
}

.mobile-links a:hover {
  color: var(--brand);
}

.mobile-categories a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 6px;
  border-bottom: 1px dashed var(--border);
  color: var(--ink);
  font-size: 14.5px;
}

.mobile-categories a i {
  color: var(--brand);
}

.mobile-categories a span {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  background: var(--bg-soft);
  border-radius: 999px;
  padding: 1px 8px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 64px;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--brand) 7%, transparent), transparent 70%),
    var(--bg);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  pointer-events: none;
}

.hero-glow-1 {
  width: 340px;
  height: 340px;
  background: rgba(99, 102, 241, 0.35);
  top: -120px;
  left: 6%;
}

.hero-glow-2 {
  width: 300px;
  height: 300px;
  background: rgba(6, 182, 212, 0.3);
  top: -60px;
  right: 8%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 10%, var(--card));
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(30px, 5vw, 50px);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.hero-sub {
  color: var(--muted);
  font-size: clamp(14px, 1.5vw, 16.5px);
  line-height: 1.8;
  margin: 0 auto 30px;
  max-width: 620px;
}

.hero-search {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 660px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 8px 8px 8px 18px;
  box-shadow: var(--shadow);
}

.hero-search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 12%, transparent), var(--shadow);
}

.hero-search i {
  color: var(--muted);
  font-size: 18px;
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  padding: 8px 0;
}

.hero-search button {
  border: 0;
  border-radius: 11px;
  padding: 11px 24px;
  font-weight: 600;
  font-size: 14.5px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.28);
  transition: 0.2s ease;
  flex: 0 0 auto;
}

.hero-search button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(79, 70, 229, 0.36);
}

.hero-quick {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
}

.hero-quick a {
  color: var(--muted);
  padding: 4px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 70%, transparent);
  border: 1px solid var(--border);
  transition: 0.18s ease;
}

.hero-quick a:hover {
  color: var(--brand);
  border-color: var(--brand);
  background: var(--card);
}

.search-hero {
  padding: 44px 0 40px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 7%, transparent), transparent);
  text-align: center;
}

.search-hero h1 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  margin-bottom: 22px;
}

.hero-search.compact {
  max-width: 580px;
  padding: 6px 6px 6px 16px;
  box-shadow: var(--shadow-sm);
}

/* ---------- Sections ---------- */
.section-block {
  margin-bottom: 44px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: -0.2px;
}

.section-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 11%, transparent);
  font-size: 16px;
}

.section-head p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.section-more {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.section-more:hover {
  color: var(--brand);
}

/* ---------- Tool cards ---------- */
.tool-card {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
  box-shadow: var(--shadow);
}

.tool-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--radius);
}

.tool-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tool-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--from), var(--to));
  color: #fff;
  font-weight: 800;
  font-size: 19px;
  box-shadow: 0 6px 14px color-mix(in srgb, var(--from) 35%, transparent);
}

.tool-heading {
  min-width: 0;
  flex: 1;
}

.tool-name {
  font-size: 15.5px;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tool-category {
  display: inline-block;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

.tool-arrow {
  color: var(--muted);
  opacity: 0;
  transform: translate(-3px, 3px);
  transition: 0.2s ease;
}

.tool-card:hover .tool-arrow {
  opacity: 1;
  transform: translate(0, 0);
  color: var(--brand);
}

.tool-tagline {
  color: var(--muted);
  font-size: 12.8px;
  line-height: 1.65;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
}

.tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tool-tags span {
  font-size: 11px;
  color: var(--muted);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 7px;
}

.tool-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  font-size: 11.5px;
  color: var(--muted);
}

.tool-meta i {
  margin-right: 3px;
}

.tool-meta-right {
  position: relative;
  z-index: 2;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-hot {
  display: inline-flex;
  align-items: center;
  color: #f97316;
}

.tool-detail {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 9%, transparent);
  border-radius: 6px;
  padding: 3px 7px;
  transition: 0.16s ease;
}

.tool-detail:hover {
  color: #fff;
  background: var(--brand);
}

.tool-detail i {
  margin-right: 0;
  font-size: 10px;
}

@media (hover: none) {
  .tool-arrow {
    opacity: 0.65;
    transform: none;
  }
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.side-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 700;
  margin-bottom: 14px;
}

.side-title i {
  color: var(--brand);
}

.side-cats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.side-cats a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12.8px;
  transition: 0.16s ease;
}

.side-cats a span {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.side-cats a i {
  color: var(--brand);
  font-size: 13px;
}

.side-cats a em {
  font-style: normal;
  font-size: 10.5px;
  color: var(--muted);
  background: var(--bg-soft);
  border-radius: 999px;
  padding: 1px 6px;
}

.side-cats a:hover {
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 8%, transparent);
}

.rank-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rank-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 13.2px;
}

.rank-list a:hover {
  background: var(--bg-soft);
  color: var(--brand);
}

.rank-index {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  flex: 0 0 auto;
}

.rank-1 {
  background: #fef3c7;
  color: #d97706;
}

.rank-2 {
  background: #e2e8f0;
  color: #475569;
}

.rank-3 {
  background: #ffedd5;
  color: #ea580c;
}

.rank-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-cat {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.submit-cta {
  background: linear-gradient(135deg, #4f46e5, #0891b2);
  border: 0;
  color: #fff;
  text-align: center;
  box-shadow: 0 16px 32px rgba(79, 70, 229, 0.25);
}

.submit-cta > i {
  font-size: 26px;
  opacity: 0.9;
}

.submit-cta h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 8px 0 6px;
}

.submit-cta p {
  font-size: 12.5px;
  opacity: 0.85;
  margin-bottom: 14px;
  line-height: 1.6;
}

/* ---------- Page hero ---------- */
.page-hero {
  padding: 26px 0 30px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 6%, transparent), transparent);
}

.breadcrumb {
  --bs-breadcrumb-divider-color: var(--muted);
  font-size: 12.5px;
  margin-bottom: 18px;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--brand);
}

.breadcrumb-item.active {
  color: var(--muted);
}

.page-hero-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.page-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-size: 25px;
  box-shadow: 0 12px 26px rgba(79, 70, 229, 0.28);
  flex: 0 0 auto;
}

.page-hero h1 {
  font-size: clamp(23px, 3vw, 32px);
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: -0.4px;
}

.page-hero p {
  color: var(--muted);
  font-size: 13.5px;
  margin: 0;
}

.page-count {
  margin-left: auto;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  border-radius: 999px;
  padding: 6px 14px;
}

/* ---------- Toolbar ---------- */
.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.sort-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.sort-tabs a {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.sort-tabs a:hover {
  color: var(--brand);
}

.sort-tabs a.active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.list-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 280px;
  max-width: 100%;
  height: 42px;
  padding: 0 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.list-search:focus-within {
  border-color: var(--brand);
}

.list-search i {
  color: var(--muted);
  font-size: 14px;
}

.list-search input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  color: var(--ink);
  font-size: 13px;
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  font-size: 12.5px;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 13px;
}

.chip:hover,
.chip.active {
  color: var(--brand);
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 8%, var(--card));
}

.result-hint {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}

/* ---------- Pager ---------- */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.pager-btn {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.pager-btn:hover {
  color: var(--brand);
  border-color: var(--brand);
}

.pager-btn.active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-color: transparent;
}

.pager-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.pager-total {
  font-size: 12px;
  color: var(--muted);
  margin-left: 8px;
}

/* ---------- Detail ---------- */
.detail-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.detail-head {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 28px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 7%, transparent), transparent 60%);
  border-bottom: 1px solid var(--border);
}

.tool-avatar-lg {
  width: 78px;
  height: 78px;
  border-radius: 20px;
  font-size: 32px;
}

.detail-title {
  flex: 1;
  min-width: 220px;
}

.detail-title h1 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.4px;
}

.badge-hot,
.badge-featured {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  padding: 3px 9px;
}

.badge-hot {
  color: #ea580c;
  background: #ffedd5;
}

.badge-featured {
  color: #7c3aed;
  background: #ede9fe;
}

[data-bs-theme="dark"] .badge-hot {
  background: rgba(234, 88, 12, 0.18);
}

[data-bs-theme="dark"] .badge-featured {
  background: rgba(124, 58, 237, 0.22);
}

.detail-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--brand);
  margin: 8px 0 10px;
}

.detail-tagline {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  line-height: 1.7;
}

.detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-actions .btn {
  border-radius: 11px;
  font-weight: 600;
  font-size: 14px;
}

.detail-actions .btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border: 0;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.28);
}

.detail-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
  padding: 28px;
}

.detail-section-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 12px;
}

.detail-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
  margin-bottom: 26px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.detail-tags a {
  font-size: 12.5px;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
  border-radius: 8px;
  padding: 5px 11px;
}

.detail-tags a:hover {
  background: var(--brand);
  color: #fff;
}

.detail-notice {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.detail-notice i {
  color: var(--brand);
  flex: 0 0 auto;
}

.info-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
}

.info-card h3 {
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 12px;
}

.info-card dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.info-card dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 8px;
}

.info-card dl > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.info-card dt {
  color: var(--muted);
  font-weight: 500;
  flex: 0 0 auto;
}

.info-card dd {
  margin: 0;
  text-align: right;
  color: var(--ink);
  min-width: 0;
}

.tip-card p {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.75;
  margin: 0;
}

/* ---------- Forms ---------- */
.form-card,
.content-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.form-control {
  border-radius: 11px;
  border-color: var(--border);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
}

.form-control:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent);
  background: var(--card);
}

.form-label {
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 8px;
}

.form-text {
  font-size: 12px;
  color: var(--muted);
}

.alert {
  border-radius: 12px;
  font-size: 13.5px;
}

.content-card h2 {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 12px;
}

.content-card h2:not(:first-child) {
  margin-top: 28px;
}

.content-card p,
.content-card li {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}

.content-card ul {
  padding-left: 20px;
}

/* ---------- Empty ---------- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.empty-state > i {
  font-size: 42px;
  color: var(--brand);
  opacity: 0.55;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin: 16px 0 8px;
}

.empty-state p {
  font-size: 13.5px;
  margin-bottom: 20px;
}

.empty-state a:not(.btn) {
  color: var(--brand);
}

.error-code {
  font-size: clamp(70px, 14vw, 120px);
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -4px;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 40px;
  background: #0b1220;
  color: #94a3b8;
  padding: 48px 0 24px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  margin-bottom: 14px;
}

.footer-desc {
  font-size: 12.8px;
  line-height: 1.85;
  max-width: 420px;
  margin: 0;
  color: #7c8aa0;
}

.footer-title {
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: #7c8aa0;
  font-size: 12.8px;
}

.footer-links a:hover {
  color: #a5b4fc;
}

.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-tags a {
  font-size: 12px;
  color: #94a3b8;
  background: #131e31;
  border: 1px solid #1e2c44;
  border-radius: 7px;
  padding: 5px 10px;
}

.footer-tags a:hover {
  color: #a5b4fc;
  border-color: #4f46e5;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid #1e2c44;
  font-size: 11.5px;
  color: #64748b;
}

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1020;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--brand);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1199.98px) {
  .detail-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .info-card {
    margin-bottom: 0;
  }
}

@media (max-width: 991.98px) {
  .hero {
    padding: 52px 0 46px;
  }

  .sidebar {
    position: static;
  }

  .side-cats {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767.98px) {
  .site-header .navbar {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .hero {
    padding: 44px 0 40px;
  }

  .hero-search {
    padding: 6px 6px 6px 14px;
    border-radius: 14px;
  }

  .hero-search button {
    padding: 10px 18px;
  }

  .hero-search input {
    font-size: 14px;
  }

  .section-head {
    align-items: flex-start;
  }

  .section-head h2 {
    font-size: 18px;
  }

  .page-count {
    margin-left: 0;
  }

  .detail-head {
    padding: 20px;
  }

  .detail-body {
    padding: 20px;
  }

  .detail-aside {
    grid-template-columns: 1fr;
  }

  .detail-actions {
    width: 100%;
  }

  .detail-actions .btn {
    flex: 1;
  }

  .list-toolbar {
    align-items: stretch;
  }

  .list-search {
    width: 100%;
  }

  .side-cats {
    grid-template-columns: 1fr 1fr;
  }

  .form-card,
  .content-card {
    padding: 20px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 575.98px) {
  .hero-quick {
    display: none;
  }

  .hero-badge {
    font-size: 11.5px;
  }

  .tool-card {
    padding: 16px;
  }

  .sort-tabs {
    width: 100%;
  }

  .sort-tabs a {
    flex: 1;
    text-align: center;
  }

  .chip {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   UI Polish Layer - refined visuals & responsive tuning
   ============================================================ */
:root {
  --muted: #5c6b82;
  --border: #e3e9f2;
  --radius: 18px;
  --radius-sm: 13px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 14px -10px rgba(15, 23, 42, 0.12);
  --shadow: 0 16px 40px -22px rgba(15, 23, 42, 0.24);
  --shadow-lg: 0 30px 70px -30px rgba(15, 23, 42, 0.32);
}

[data-bs-theme="dark"] {
  --muted: #93a4bd;
  --border: #1e2c44;
}

::selection {
  background: color-mix(in srgb, var(--brand) 24%, transparent);
}

:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand) 65%, transparent);
  outline-offset: 2px;
}

.btn {
  white-space: nowrap;
}

.site-header {
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 10px 30px -18px rgba(15, 23, 42, 0.28);
}

[data-bs-theme="dark"] .site-header.is-scrolled {
  box-shadow: 0 12px 34px -16px rgba(0, 0, 0, 0.6);
}

.header-search {
  width: 250px;
}

/* ---------- Hero ---------- */
.hero {
  padding: 78px 0 66px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--brand) 7%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--brand) 7%, transparent) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 40%, #000 20%, transparent 78%);
  mask-image: radial-gradient(ellipse 70% 65% at 50% 40%, #000 20%, transparent 78%);
  opacity: 0.55;
  pointer-events: none;
}

.hero .container {
  z-index: 2;
}

.hero-content {
  max-width: 780px;
  margin: 0 auto;
  position: relative;
}

.hero-badge {
  padding: 7px 16px;
  background: color-mix(in srgb, var(--card) 72%, transparent);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px -16px color-mix(in srgb, var(--brand) 60%, transparent);
}

.hero h1 {
  line-height: 1.14;
  letter-spacing: -1.2px;
  margin-bottom: 18px;
}

.hero-sub {
  margin-bottom: 32px;
}

.hero-search {
  box-shadow: 0 22px 50px -28px color-mix(in srgb, var(--brand) 55%, transparent), var(--shadow-sm);
}

.hero-search button {
  background-image: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
}

.hero-quick a {
  background: color-mix(in srgb, var(--card) 58%, transparent);
  backdrop-filter: blur(6px);
}

.hero-stats {
  display: inline-flex;
  align-items: center;
  gap: 26px;
  margin-top: 30px;
  padding: 12px 26px;
  border: 1px solid color-mix(in srgb, var(--border) 90%, transparent);
  border-radius: 16px;
  background: color-mix(in srgb, var(--card) 62%, transparent);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

.hero-stats > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
  gap: 3px;
}

.hero-stats strong {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
}

.hero-stats span {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.4px;
}

.hero-stats > i {
  width: 1px;
  height: 26px;
  background: var(--border);
}

.hero-orbit {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.orbit-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px 8px 8px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  background: color-mix(in srgb, var(--card) 72%, transparent);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 38px -26px rgba(15, 23, 42, 0.4);
  animation: orbitFloat 7s ease-in-out infinite;
}

.orbit-chip > b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.orbit-chip > span {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.orbit-chip strong {
  font-size: 11.5px;
  color: var(--ink);
}

.orbit-chip em {
  font-size: 10px;
  font-style: normal;
  color: var(--muted);
}

.orbit-1 {
  left: 4.5%;
  top: 26%;
  transform: rotate(-5deg);
}

.orbit-2 {
  right: 5%;
  top: 20%;
  transform: rotate(4deg);
  animation-delay: -2.4s;
}

.orbit-3 {
  left: 8%;
  bottom: 17%;
  transform: rotate(3deg);
  animation-delay: -4.2s;
}

.orbit-4 {
  right: 7%;
  bottom: 14%;
  transform: rotate(-4deg);
  animation-delay: -1.2s;
}

@keyframes orbitFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -9px; }
}

.mobile-cat-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.mobile-cat-scroll::-webkit-scrollbar {
  display: none;
}

.mobile-cat-scroll a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.mobile-cat-scroll a i {
  color: var(--brand);
  font-size: 13px;
}

/* ---------- Sections ---------- */
.section-block {
  margin-bottom: 48px;
}

.section-head h2 {
  font-size: 22px;
}

.section-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
  line-height: 1.5;
}

.section-more i {
  transition: transform 0.18s ease;
  display: inline-block;
}

.section-more:hover i {
  transform: translateX(3px);
}

.side-cat-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand);
}

.side-cat-all:hover {
  color: var(--brand-strong);
}

/* ---------- Cards ---------- */
.tool-card {
  overflow: hidden;
  border-radius: 18px;
  padding: 19px;
}

.tool-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(320px 170px at 100% 0%, color-mix(in srgb, var(--accent, var(--brand)) 14%, transparent), transparent 72%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card:hover {
  border-color: color-mix(in srgb, var(--accent, var(--brand)) 38%, var(--border));
  box-shadow: 0 24px 44px -26px color-mix(in srgb, var(--accent, var(--brand)) 55%, transparent), var(--shadow-sm);
}

.tool-avatar {
  transition: transform 0.25s ease;
}

.tool-card:hover .tool-avatar {
  transform: scale(1.06) rotate(-2deg);
}

.tool-name {
  font-size: 16px;
  letter-spacing: -0.15px;
}

.tool-tagline {
  font-size: 13px;
  line-height: 1.7;
  min-height: 44px;
}

.tool-arrow {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg-soft);
  opacity: 0.75;
  transform: none;
  font-size: 13px;
  transition: 0.2s ease;
}

.tool-card:hover .tool-arrow {
  background: color-mix(in srgb, var(--accent, var(--brand)) 14%, transparent);
  color: var(--accent, var(--brand));
  opacity: 1;
  transform: translate(1px, -1px);
}

.tool-tags span {
  background: transparent;
}

.tool-detail {
  border: 1px solid color-mix(in srgb, var(--brand) 16%, transparent);
}

/* ---------- Page hero ---------- */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 30px 0 36px;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--brand) 7%, transparent), transparent 78%),
    radial-gradient(640px 280px at 86% 0%, color-mix(in srgb, var(--brand-2) 10%, transparent), transparent 70%);
  pointer-events: none;
}

.page-watermark {
  position: absolute;
  right: 1%;
  top: -26px;
  font-size: 210px;
  line-height: 1;
  color: var(--brand);
  opacity: 0.055;
  transform: rotate(-10deg);
  pointer-events: none;
  z-index: 0;
}

.page-hero-inner {
  position: relative;
  z-index: 1;
}

.page-hero-text {
  flex: 1;
  min-width: 0;
}

.page-hero-text h1 {
  margin-bottom: 7px;
}

.page-icon {
  box-shadow: 0 16px 30px -14px color-mix(in srgb, var(--brand) 65%, transparent);
}

.page-count {
  border: 1px solid color-mix(in srgb, var(--brand) 16%, transparent);
}

/* ---------- Filter toolbar ---------- */
.filter-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  margin-bottom: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.chips-scroll {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.chips-scroll::-webkit-scrollbar {
  display: none;
}

.chips-scroll .category-chips {
  flex-wrap: nowrap;
}

.filter-panel .sort-tabs {
  flex: 0 0 auto;
  background: var(--bg-soft);
  border-color: transparent;
}

.filter-panel .list-search {
  flex: 0 0 auto;
  width: 270px;
  background: var(--bg-soft);
  border-color: transparent;
}

.chip {
  white-space: nowrap;
  padding: 7px 14px;
}

/* ---------- Forms ---------- */
.form-card {
  padding: 32px;
}

.form-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 22px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.form-card-head h2 {
  font-size: 19px;
  font-weight: 800;
  margin: 0 0 5px;
}

.form-card-head p {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0;
}

.form-card-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  font-size: 18px;
  flex: 0 0 auto;
}

.form-card .form-control {
  padding: 11px 14px;
}

.submit-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
}

.submit-actions .btn {
  padding: 12px 30px;
}

.submit-actions span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

/* ---------- Detail ---------- */
.detail-card {
  box-shadow: var(--shadow);
}

.detail-head {
  padding: 32px;
  background:
    radial-gradient(520px 240px at 92% 0%, color-mix(in srgb, var(--brand-2) 10%, transparent), transparent 70%),
    linear-gradient(135deg, color-mix(in srgb, var(--brand) 7%, transparent), transparent 62%);
}

.detail-body {
  gap: 40px;
}

.detail-main {
  min-width: 0;
}

.detail-aside {
  align-self: start;
}

.detail-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16.5px;
  margin-bottom: 14px;
}

.detail-desc {
  font-size: 14.5px;
  line-height: 2;
}

.detail-faq {
  --bs-accordion-border-width: 0;
  --bs-accordion-bg: transparent;
  --bs-accordion-btn-focus-box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 26px;
}

.detail-faq .accordion-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-soft);
}

.detail-faq .accordion-button {
  padding: 14px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
}

.detail-faq .accordion-button:not(.collapsed) {
  color: var(--brand);
  background: transparent;
}

.detail-faq .accordion-body {
  padding: 0 16px 16px;
  font-size: 13px;
  line-height: 1.85;
  color: var(--muted);
}

.tip-card p {
  line-height: 1.8;
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  padding: 52px 0 24px;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--brand) 55%, transparent), transparent);
}

.footer-bottom {
  padding-bottom: env(safe-area-inset-bottom);
}

/* ---------- Offcanvas ---------- */
.offcanvas.offcanvas-end {
  width: min(400px, 86vw);
  border-radius: 22px 0 0 22px;
  box-shadow: -24px 0 70px -30px rgba(0, 0, 0, 0.45);
}

.offcanvas-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.offcanvas-body {
  padding: 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

.mobile-links a {
  transition: 0.16s ease;
}

.mobile-links a:hover {
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 8%, transparent);
}

/* ---------- Pager ---------- */
.pager-btn {
  min-width: 42px;
  height: 42px;
  border-radius: 12px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1399.98px) {
  .orbit-1 { left: 2.5%; }
  .orbit-2 { right: 2.5%; }
  .orbit-3 { left: 5%; }
  .orbit-4 { right: 4%; }
}

@media (max-width: 1279.98px) {
  .hero-orbit {
    display: none;
  }
}

@media (max-width: 1199.98px) {
  .header-search {
    width: 210px;
  }

  .detail-aside {
    position: static;
  }
}

@media (min-width: 1200px) {
  .detail-aside {
    position: sticky;
    top: 90px;
  }
}

@media (max-width: 991.98px) {
  .hero {
    padding: 56px 0 48px;
  }

  .hero h1 {
    letter-spacing: -0.8px;
  }

  .filter-panel {
    flex-wrap: wrap;
  }

  .filter-panel .list-search {
    margin-left: auto;
  }
}

@media (max-width: 767.98px) {
  .section-block {
    margin-bottom: 34px;
  }

  .section-head h2 {
    font-size: 18px;
    gap: 8px;
  }

  .tool-card {
    padding: 17px;
    gap: 9px;
  }

  .tool-tagline {
    min-height: 0;
  }

  .filter-panel {
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    gap: 10px;
  }

  .filter-panel .sort-tabs {
    width: 100%;
  }

  .filter-panel .sort-tabs a {
    flex: 1;
    text-align: center;
  }

  .filter-panel .list-search {
    width: 100%;
    margin-left: 0;
  }

  .filter-panel .chips-scroll {
    width: 100%;
  }

  .page-watermark {
    font-size: 150px;
    right: -4%;
    top: -10px;
  }

  .form-card {
    padding: 22px;
  }

  .detail-head {
    padding: 22px;
  }

  .detail-body {
    padding: 22px;
    gap: 28px;
  }

  .site-footer {
    padding: 40px 0 20px;
  }
}

@media (max-width: 575.98px) {
  .hero {
    padding: 38px 0 34px;
  }

  .hero::before {
    background-size: 48px 48px;
  }

  .hero-badge {
    font-size: 11.5px;
    padding: 6px 13px;
    margin-bottom: 16px;
  }

  .hero h1 {
    font-size: 30px;
    letter-spacing: -0.6px;
    margin-bottom: 14px;
  }

  .hero-sub {
    font-size: 13.5px;
    line-height: 1.75;
    margin-bottom: 24px;
  }

  .hero-search {
    border-radius: 15px;
    padding: 6px 6px 6px 14px;
    gap: 8px;
  }

  .hero-search i {
    font-size: 16px;
  }

  .hero-search input {
    font-size: 13.5px;
    padding: 8px 0;
  }

  .hero-search button {
    padding: 10px 18px;
    font-size: 13.5px;
    border-radius: 10px;
  }

  .hero-quick {
    display: flex;
    justify-content: flex-start;
    gap: 7px;
    margin: 14px -16px 0;
    padding: 0 16px 2px;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .hero-quick::-webkit-scrollbar {
    display: none;
  }

  .hero-quick span,
  .hero-quick a {
    flex: 0 0 auto;
  }

  .hero-quick a {
    font-size: 12px;
    padding: 4px 10px;
  }

  .hero-stats {
    gap: 18px;
    margin-top: 20px;
    padding: 10px 18px;
    border-radius: 14px;
  }

  .hero-stats strong {
    font-size: 16px;
  }

  .hero-stats span {
    font-size: 10px;
  }

  .hero-stats > i {
    height: 22px;
  }

  .page-hero {
    padding: 16px 0 22px;
  }

  .page-hero .breadcrumb {
    margin-bottom: 12px;
    font-size: 12px;
  }

  .page-hero-inner {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px 14px;
    align-items: center;
  }

  .page-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 21px;
  }

  .page-hero-text h1 {
    font-size: 22px;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
  }

  .page-hero-text p {
    font-size: 12.5px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .page-count {
    grid-column: 1 / -1;
    justify-self: start;
    margin-left: 0;
    margin-top: 2px;
    font-size: 11.5px;
    padding: 4px 11px;
  }

  .page-watermark {
    display: none;
  }

  .mobile-cat-scroll {
    margin: 0 -12px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .form-card {
    padding: 20px;
    border-radius: 16px;
  }

  .form-card-head {
    padding-bottom: 16px;
    margin-bottom: 18px;
  }

  .form-card-head h2 {
    font-size: 17px;
  }

  .form-card-icon {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  .submit-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .submit-actions .btn {
    width: 100%;
  }

  .submit-actions span {
    text-align: center;
  }

  .detail-head {
    gap: 16px;
  }

  .tool-avatar-lg {
    width: 64px;
    height: 64px;
    border-radius: 17px;
    font-size: 26px;
  }

  .detail-title h1 {
    font-size: 24px;
  }

  .detail-actions {
    width: 100%;
  }

  .detail-actions .btn {
    flex: 1;
    font-size: 13.5px;
    padding: 10px 12px;
  }

  .detail-body {
    padding: 18px;
    gap: 24px;
  }

  .detail-aside {
    grid-template-columns: 1fr;
  }

  .detail-faq .accordion-button {
    font-size: 13px;
  }

  .summary-title,
  .section-title {
    font-size: 17px;
  }

  .side-cats {
    grid-template-columns: 1fr 1fr;
  }

  .offcanvas.offcanvas-end {
    width: 88vw;
    border-radius: 18px 0 0 18px;
  }

  .pager-btn {
    min-width: 40px;
    height: 40px;
  }
}

@media (max-width: 359.98px) {
  .hero h1 {
    font-size: 27px;
  }

  .hero-stats {
    gap: 13px;
    padding: 9px 12px;
  }

  .hero-stats strong {
    font-size: 15px;
  }

  .hero-search button {
    padding: 10px 13px;
  }

  .detail-actions {
    flex-direction: column;
  }
}

/* ---------- Detail share card ---------- */
.share-card p {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 12px;
}

.share-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.share-actions .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--card);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 500;
}

.share-actions .btn:hover {
  color: var(--brand);
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 6%, var(--card));
}

/* ---------- Tablet / small desktop refinements ---------- */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .side-cats {
    grid-template-columns: 1fr;
  }

  .side-cats a {
    padding: 8px 6px;
  }
}

@media (max-width: 575.98px) {
  .hero-quick span {
    display: none;
  }

  .hero-quick {
    gap: 6px;
  }

  .mobile-cat-scroll {
    -webkit-mask-image: linear-gradient(90deg, #000 94%, transparent);
    mask-image: linear-gradient(90deg, #000 94%, transparent);
  }
}

/* ---------- Custom select ---------- */
.form-card .form-select {
  padding: 11px 38px 11px 14px;
  border-radius: 11px;
  border-color: var(--border);
  background-color: var(--bg);
  color: var(--ink);
  font-size: 14px;
}

.form-card .form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent);
  background-color: var(--card);
}

[data-bs-theme="dark"] .form-card .form-select {
  background-color: var(--bg-soft);
}

/* ---------- Tool logos ---------- */
.tool-avatar {
  position: relative;
  overflow: hidden;
}

.tool-avatar .avatar-letter {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.tool-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
  background: #fff;
}

.tool-avatar-lg img {
  padding: 12px;
}

[data-bs-theme="dark"] .tool-avatar img {
  background: #fff;
}

/* ---------- Hero orbit logos ---------- */
.orbit-chip > .orbit-logo {
  overflow: hidden;
  padding: 0;
  background: linear-gradient(135deg, var(--from, var(--brand)), var(--to, var(--brand-2)));
}

.orbit-chip > .orbit-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  padding: 3px;
  border-radius: 9px;
  display: block;
}

/* ---------- Home sidebar readability ---------- */
.side-cats a {
  font-size: 14px;
  padding: 9px 7px;
}

.side-cats a i {
  font-size: 14px;
}

.side-cats a em {
  font-size: 11px;
  padding: 1px 7px;
}

.rank-list a {
  font-size: 14.5px;
  padding: 9px 6px;
}

.rank-index {
  width: 22px;
  height: 22px;
  font-size: 11.5px;
}

.rank-cat {
  font-size: 11.5px;
}

/* ---------- SEO content blocks ---------- */
.seo-block {
  margin-top: 8px;
  padding: 30px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}

.seo-block h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.2px;
  margin-bottom: 14px;
}

.seo-block p {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.95;
  margin-bottom: 10px;
}

.seo-block p a {
  color: var(--brand);
}

.seo-block p a:hover {
  text-decoration: underline;
}

.seo-links-title {
  margin-top: 18px !important;
  margin-bottom: 8px !important;
  font-size: 13px !important;
  font-weight: 600;
  color: var(--ink) !important;
}

.seo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.seo-links a {
  font-size: 12.5px;
  color: var(--muted);
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  transition: 0.16s ease;
}

.seo-links a:hover {
  color: var(--brand);
  border-color: var(--brand);
  background: var(--card);
}

/* ---------- HTML sitemap ---------- */
.sitemap-card {
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}

.sitemap-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 20px;
  margin-bottom: 4px;
  border-bottom: 1px dashed var(--border);
}

.sitemap-nav a {
  font-size: 12.5px;
  color: var(--muted);
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-soft);
}

.sitemap-nav a:hover {
  color: var(--brand);
  border-color: var(--brand);
}

.sitemap-group {
  padding: 22px 0;
  border-bottom: 1px dashed var(--border);
}

.sitemap-group:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.sitemap-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sitemap-group-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.sitemap-group-head h2 i {
  color: var(--brand);
}

.sitemap-group-head h2 a {
  color: var(--ink);
}

.sitemap-group-head h2 a:hover {
  color: var(--brand);
}

.sitemap-group-head h2 span {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg-soft);
  border-radius: 999px;
  padding: 2px 8px;
}

.sitemap-more {
  font-size: 12px;
  color: var(--brand);
  white-space: nowrap;
}

.sitemap-tools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 5px 18px;
}

.sitemap-tools a {
  font-size: 12.8px;
  color: var(--muted);
  padding: 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sitemap-tools a:hover {
  color: var(--brand);
}

@media (max-width: 767.98px) {
  .seo-block {
    padding: 22px;
  }

  .seo-block h2 {
    font-size: 17px;
  }

  .seo-block p {
    font-size: 13px;
  }

  .sitemap-card {
    padding: 20px;
  }

  .sitemap-group-head h2 {
    font-size: 15px;
  }

  .sitemap-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 12px;
  }
}

/* ---------- Sidebar typography (final override) ---------- */
.sidebar .side-title {
  font-size: 15px;
}

.sidebar .side-cats a {
  font-size: 15px;
  line-height: 1.45;
}

.sidebar .side-cats a i {
  font-size: 15px;
}

.sidebar .side-cats a em {
  font-size: 11.5px;
}

.sidebar .rank-list a {
  font-size: 15px;
  line-height: 1.45;
}

.sidebar .rank-name {
  font-size: 15px;
}

.sidebar .rank-cat {
  font-size: 11.5px;
}

/* ---------- Card link hierarchy ---------- */
.tool-card .tool-arrow {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  text-decoration: none;
}

/* ---------- Header logo & sidebar navigation scale ---------- */
.navbar-brand {
  gap: 12px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 17px;
}

.brand-title {
  font-size: 19px;
}

.brand-sub {
  font-size: 10px;
  letter-spacing: 1.8px;
}

.sidebar .side-title {
  font-size: 16px;
}

.sidebar .side-cats a {
  font-size: 16px;
  padding: 10px 8px;
}

.sidebar .side-cats a i {
  font-size: 16px;
}

.sidebar .side-cats a em {
  font-size: 12px;
  padding: 2px 8px;
}

@media (max-width: 575.98px) {
  .navbar-brand {
    gap: 10px;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    font-size: 16px;
  }

  .brand-title {
    font-size: 18px;
  }
}

/* ---------- Header navigation emphasis ---------- */
.navbar-nav .nav-link {
  position: relative;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2px;
  padding: 10px 16px !important;
  border-radius: 11px;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.navbar-nav .nav-link:not(.dropdown-toggle)::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease;
}

.navbar-nav .nav-link:hover {
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 8%, transparent);
  transform: translateY(-1px);
}

.navbar-nav .nav-link:not(.dropdown-toggle):hover::after {
  transform: scaleX(1);
}

.navbar-nav .nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--brand) 75%, transparent);
}

.navbar-nav .nav-link:not(.dropdown-toggle).active::after {
  display: none;
}

.navbar-nav .dropdown-toggle::after {
  margin-left: 7px;
  vertical-align: 0.15em;
  transition: transform 0.22s ease;
}

.navbar-nav .dropdown-toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.navbar-nav .nav-link:active {
  transform: translateY(0) scale(0.98);
}

.category-mega .dropdown-item {
  font-size: 14.5px;
  font-weight: 500;
  padding: 9px 11px;
  transition: 0.16s ease;
}

.category-mega .dropdown-item:hover {
  transform: translateX(2px);
}

.mobile-links a {
  font-size: 15px;
  font-weight: 600;
  padding: 12px 14px;
}

.mobile-categories a {
  font-size: 15.5px;
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .navbar-nav .nav-link {
    font-size: 15px;
    padding: 9px 12px !important;
  }
}

/* ---------- Dropdown visibility hardening ---------- */
.site-header {
  overflow: visible;
}

.navbar,
.navbar-collapse,
.navbar-nav,
.navbar-nav .nav-item,
.navbar-nav .nav-item.dropdown {
  position: relative;
}

.navbar-nav .nav-item.dropdown {
  z-index: 20;
}

.category-mega {
  z-index: 1060 !important;
}

/* ---------- Category mega menu readability ---------- */
.category-mega {
  width: 600px;
  padding: 12px;
}

.category-mega .dropdown-item {
  font-size: 16px;
  font-weight: 500;
  padding: 10px 12px;
  gap: 9px;
  line-height: 1.5;
}

.category-mega .dropdown-item i {
  font-size: 17px;
}

/* ---------- Category mega menu separators ---------- */
.category-mega .col-4 {
  padding: 0 5px;
}

.category-mega .col-4 + .col-4 {
  border-left: 1px dashed color-mix(in srgb, var(--border) 90%, transparent);
}

.category-mega .dropdown-item {
  margin: 0 2px;
  border-bottom: 1px dashed color-mix(in srgb, var(--border) 90%, transparent);
  border-radius: 8px;
}

.category-mega .col-4:nth-last-child(-n + 3) .dropdown-item {
  border-bottom-color: transparent;
}

.category-mega .dropdown-item:hover {
  border-bottom-color: transparent;
}

/* ---------- Footer friend links ---------- */
.footer-friends {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #1e2c44;
}

.footer-friends-title {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.footer-friends-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-friends-list a {
  font-size: 12px;
  color: #94a3b8;
  padding: 4px 10px;
  border: 1px solid #1e2c44;
  border-radius: 7px;
  background: #131e31;
  transition: 0.16s ease;
}

.footer-friends-list a:hover {
  color: #a5b4fc;
  border-color: #4f46e5;
  background: #17233a;
}

@media (max-width: 575.98px) {
  .footer-friends {
    flex-direction: column;
    gap: 9px;
  }
}
