:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --success: #10b981;
  --danger: #ef4444;
  --success-bg: #f0fdf4;
  --success-text: #166534;
  --error-bg: #fef2f2;
  --error-text: #991b1b;
  --warning-bg: #fef3c7;
  --warning-text: #d97706;
  --info-bg: linear-gradient(135deg, #eff6ff, #f0fdf4);
  --info-border: #bfdbfe;
  --info-text: #1e40af;
  --tip-bg: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  --tip-border: #86efac;
  --tip-text: #166534;
  --hero-bg: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 50%, #ede9fe 100%);
  --icon-bg: #eef2ff;
  --badge-bg: #f0fdf4;
}

[data-theme="dark"] {
  --primary: #818cf8;
  --primary-dark: #6366f1;
  --bg: #0f172a;
  --card: #1e293b;
  --text: #e2e8f0;
  --text-light: #94a3b8;
  --border: #334155;
  --success: #34d399;
  --danger: #f87171;
  --success-bg: #052e16;
  --success-text: #34d399;
  --error-bg: #450a0a;
  --error-text: #f87171;
  --warning-bg: #78350f;
  --warning-text: #fbbf24;
  --info-bg: linear-gradient(135deg, #1e1b4b, #0c4a6e);
  --info-border: #3730a3;
  --info-text: #a5b4fc;
  --tip-bg: linear-gradient(135deg, #052e16, #0c4a6e);
  --tip-border: #166534;
  --tip-text: #86efac;
  --hero-bg: linear-gradient(135deg, #1e1b4b 0%, #1e293b 50%, #1e1b4b 100%);
  --icon-bg: #1e1b4b;
  --badge-bg: #052e16;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Avenir Next", "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.07), transparent 28%),
    radial-gradient(circle at top right, rgba(236, 138, 31, 0.07), transparent 26%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  transition: background-color .2s ease, color .2s ease;
}

[data-theme="dark"] body {
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.08), transparent 26%),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 22%),
    var(--bg);
}

main { flex: 1; width: 100%; min-width: 0; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* Nav */
.nav {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(215, 225, 219, 0.9);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(18px);
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
[data-theme="dark"] .nav {
  background: rgba(7, 13, 12, 0.94);
  border-bottom-color: rgba(34, 52, 48, 0.92);
}
.nav::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, rgba(15, 118, 110, 0.85), rgba(236, 138, 31, 0.8), rgba(15, 118, 110, 0.85));
}
.nav-inner {
  display: flex;
  align-items: center;
  height: 68px;
  gap: 1.1rem;
}
.nav-inner .nav-logo { margin-right: auto; }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}
.nav-logo {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  letter-spacing: 0.01em;
}
.nav-logo span:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.14), rgba(236, 138, 31, 0.18));
  font-size: 1rem;
}
.nav-logo span:last-child {
  white-space: nowrap;
}
.nav-links {
  display: flex;
  gap: 0.55rem;
  list-style: none;
}
.nav-links a {
  color: var(--text-light);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 0.9rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: color 0.2s, background-color 0.2s;
}
.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
  background: rgba(15, 118, 110, 0.08);
}
.mobile-menu-btn {
  min-width: 44px;
  min-height: 44px;
  border-radius: 999px;
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
}

/* Hero */
html { scroll-behavior: smooth; }
.hero {
  text-align: center;
  padding: 4.2rem 1.25rem 3rem;
  background: var(--hero-bg);
  border-bottom: 1px solid rgba(215, 225, 219, 0.65);
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .hero {
  background: var(--hero-bg);
}
.hero::before {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%);
  top: -40px;
  right: -40px;
  border-radius: 50%;
  animation: heroPulse 6s ease-in-out infinite;
}
.hero::after {
  content: '';
  position: absolute;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(168,85,247,0.06) 0%, transparent 70%);
  bottom: -20px;
  left: -20px;
  border-radius: 50%;
  animation: heroPulse 8s ease-in-out infinite reverse;
}
@keyframes heroPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: .5rem;
  color: var(--text);
  position: relative;
  z-index: 1;
}
.hero p {
  font-size: 1.04rem;
  color: var(--text-light);
  max-width: 700px;
  line-height: 1.8;
  margin: 0 auto 1rem;
  position: relative;
  z-index: 1;
}
.hero .hero-stats {
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}
.hero .hero-stats .hs {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(215, 225, 219, 0.9);
  backdrop-filter: blur(4px);
  padding: .55rem .95rem;
  border-radius: 18px;
  font-size: .85rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}
[data-theme="dark"] .hero .hero-stats .hs {
  background: rgba(16, 30, 27, 0.7);
  border-color: rgba(34, 52, 48, 0.9);
}
.hero .hero-stats .hs .hs-num { font-weight: 700; color: var(--primary); font-size: .95rem; }
.hero .hero-stats .hs .hs-label { color: var(--text-light); font-size: .8rem; }
.search-box {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.search-box input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  background: var(--card);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}
.search-box input:focus { border-color: var(--primary); }
.search-box .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

/* Directory shell for MCP / AI Skills pages */
.directory-hero {
  margin: 0 0 1.1rem;
  padding: 1.9rem 1.5rem 1.6rem;
  border: 1px solid var(--border);
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(99,102,241,0.08) 0, transparent 36%),
    radial-gradient(circle at bottom right, rgba(16,185,129,0.08) 0, transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.98));
}
[data-theme="dark"] .directory-hero {
  background:
    radial-gradient(circle at top left, rgba(129,140,248,0.12) 0, transparent 36%),
    radial-gradient(circle at bottom right, rgba(52,211,153,0.08) 0, transparent 34%),
    linear-gradient(180deg, rgba(30,41,59,0.92), rgba(15,23,42,0.98));
}
.directory-hero h1 {
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  line-height: 1.12;
  margin: .25rem 0 .65rem;
}
.directory-hero p {
  max-width: 760px;
  color: var(--text-light);
  line-height: 1.68;
  font-size: .98rem;
}
.directory-filterbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .65rem;
  align-items: center;
  margin: 1rem 0 .85rem;
}
.directory-filterbar input {
  min-width: 0;
  padding: .78rem .95rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: .92rem;
  background: var(--card);
  color: var(--text);
}
.directory-filterbar input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.directory-chip-list {
  display: flex;
  gap: .45rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: .15rem;
  scrollbar-width: none;
}
.directory-chip-list::-webkit-scrollbar { display: none; }
.directory-chip-list > button,
.directory-chip-list > a {
  flex: 0 0 auto;
}
.directory-chip {
  padding: .5rem .85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: .84rem;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.directory-chip:hover { border-color: var(--primary); }
.directory-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.directory-surface-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .65rem;
  margin-bottom: 1rem;
}
.directory-surface-list[hidden] { display: none; }
.directory-surface-list a,
.directory-surface-list .directory-surface-item {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .78rem .9rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 600;
}
.directory-surface-list a:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.directory-grid {
  display: grid;
  gap: 1rem;
}
.directory-card {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  padding: 1.05rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 14px 30px rgba(15,23,42,.04);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
[data-theme="dark"] .directory-card { box-shadow: none; }
.directory-card:hover {
  border-color: var(--primary);
  box-shadow: 0 18px 34px rgba(99,102,241,.08);
  transform: translateY(-2px);
}
.directory-card-actions {
  display: flex;
  gap: .55rem;
  flex-wrap: wrap;
  margin-top: auto;
}
.directory-card-actions a,
.directory-card-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .65rem .9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  font-size: .86rem;
  font-weight: 600;
  background: var(--card);
  cursor: pointer;
}
.directory-card-actions a:hover,
.directory-card-actions button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Tool Cards Grid */
.tools-section { padding-top: 1.5rem; padding-bottom: 1rem; }
.tools-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.tool-card {
  border-radius: 18px;
  border: 1px solid rgba(215, 225, 219, 0.92);
  padding: 1.2rem;
  background: linear-gradient(180deg, rgba(255,255,255,1), rgba(248,252,250,0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), var(--surface-shadow-soft);
  text-decoration: none;
  color: inherit;
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.72rem;
}
.tool-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--surface-shadow);
  border-color: rgba(15, 118, 110, 0.38);
}
.tool-card:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99,102,241,0.08);
}
.tool-card .icon {
  width: 46px;
  height: 46px;
  background: var(--icon-bg);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
[data-theme="dark"] .tool-card .icon { background: var(--icon-bg); }
.tool-card h3 { font-size: .95rem; font-weight: 600; }
.tool-card p { font-size: .8rem; color: var(--text-light); line-height: 1.4; }
.tool-card .badge {
  background: var(--badge-bg);
  color: var(--primary);
  font-size: 0.75rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-weight: 600;
  align-self: flex-start;
}
.tool-card .badge.coming {
  background: var(--warning-bg);
  color: var(--warning-text);
}

/* Tool Page Layout */
.tool-header {
  padding: 2rem 0 1rem;
}
.breadcrumb {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.tool-header h1 { font-size: 1.75rem; font-weight: 700; }
.tool-header p { color: var(--text-light); margin-top: 0.5rem; }

.tool-area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  padding-bottom: 2rem;
}
.tool-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 600;
}
.panel-body { padding: 1rem; }
.panel-body textarea, .panel-body input[type="text"], .panel-body input[type="number"] {
  width: 100%;
  min-height: 300px;
  border: none;
  outline: none;
  font-family: "SF Mono", "Cascadia Code", "Fira Code", monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  resize: vertical;
  background: transparent;
  color: var(--text);
}
.panel-body input[type="text"], .panel-body input[type="number"] {
  min-height: auto;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}

/* Action Buttons */
.tool-actions {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 0;
  flex-wrap: wrap;
  justify-content: center;
}
.btn {
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--bg); color: var(--text); }
.btn-secondary:hover { background: var(--border); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { opacity: 0.9; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: 0.9; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8rem; }

/* Status Messages */
.status {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: none;
}
.status.success { display: block; background: var(--success-bg); color: var(--success-text); }
.status.error { display: block; background: var(--error-bg); color: var(--error-text); }

/* Ad Placeholder */
.ad-slot {
  display: none;
}

/* Related Tools */
.related-tools { padding: 2rem 0; }
.related-tools h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; }

/* Footer */
.footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
  margin-top: auto;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-links { display: flex; gap: 1.5rem; list-style: none; }
.footer-links a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.875rem;
}
.footer-links a:hover { color: var(--primary); }
.footer-copy { color: var(--text-light); font-size: 0.875rem; }

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.875rem;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 100;
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* QR specific */
.qr-options { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.qr-options label { font-size: 0.875rem; color: var(--text-light); }
.qr-options select, .qr-options input {
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.875rem;
}
#qr-result {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

/* Responsive */
@media (max-width: 768px) {
  .hero { padding: 2rem 1rem 1.5rem; }
  .hero h1 { font-size: 1.5rem; }
  .hero p { font-size: .9rem; }
  .directory-hero { padding: 1.5rem 1rem 1.25rem; border-radius: 20px; }
  .directory-hero h1 { font-size: 1.7rem; }
  .directory-filterbar { grid-template-columns: 1fr; }
  .directory-card-actions a,
  .directory-card-actions button { flex: 1; }
  .tool-area { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--card);
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    z-index: 50;
  }
  .popular-strip { gap: .35rem; }
  .popular-strip a { font-size: .75rem; padding: .25rem .6rem; }
}
@media (max-width: 480px) {
  .tools-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.35rem; }
  .hero .hero-stats { gap: .5rem; }
  .hero .hero-stats .hs { padding: .25rem .5rem; font-size: .78rem; }
  .tool-card { padding: .85rem; }
  #lang-toggle, #theme-toggle { padding: .25rem .4rem; font-size: .7rem; }
}

/* Language & Theme toggles */
#lang-toggle, #theme-toggle {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .35rem .55rem;
  font-size: .8rem;
  cursor: pointer;
  color: var(--text);
  font-weight: 500;
  transition: all .2s;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
}
#lang-toggle:hover, #theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(99,102,241,.06);
}

/* Smooth theme transition */
body, .nav, .tool-card, .tool-panel, .footer, .hero, .search-box input {
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}

/* Search "no results" message */
.search-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-light);
  font-size: 1rem;
  display: none;
}
.search-empty.visible { display: block; }

/* Improved tool card focus for keyboard nav */

/* Tool page action bar improvements */
.tool-actions .btn { font-size: .8rem; }
@media (max-width: 480px) {
  .tool-actions { gap: .5rem; }
  .tool-actions .btn { padding: .5rem .75rem; font-size: .75rem; }
}

/* Recent / Popular sections */
.recent-strip, .popular-strip {
  padding: 1rem 0 0.5rem;
}
.recent-strip .strip-header, .popular-strip .strip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.recent-strip .strip-title, .popular-strip .strip-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.strip-clear {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  transition: color 0.2s;
}
.strip-clear:hover { color: var(--danger); }

.strip-scroll {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.strip-scroll::-webkit-scrollbar { height: 4px; }
.strip-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.strip-card {
  min-width: 100px;
  max-width: 120px;
  padding: 0.75rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
  scroll-snap-align: start;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--card);
}
.strip-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(99,102,241,0.1);
}
.strip-card .sc-icon { font-size: 1.5rem; display: block; margin-bottom: 0.25rem; }
.strip-card .sc-name { font-size: 0.78rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip-card .sc-rank { font-size: 0.65rem; color: var(--text-light); margin-bottom: 0.15rem; }

.popular-strip {
  background: linear-gradient(135deg, rgba(249,115,22,0.04), rgba(234,88,12,0.04));
  border: 1px solid rgba(249,115,22,0.12);
  border-radius: 16px;
  padding: 1.25rem 1.25rem 0.75rem;
  margin-bottom: 1rem;
}
.popular-strip .strip-card { min-width: 110px; max-width: 130px; padding: 0.85rem 0.5rem; }
.popular-strip .strip-card.rank-1 { border-color: #f59e0b; }
.popular-strip .strip-card.rank-2 { border-color: #94a3b8; }
.popular-strip .strip-card.rank-3 { border-color: #d97706; }

/* Heat badge on tool cards */
.tool-card { position: relative; }
.heat-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.75rem;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 999px;
  pointer-events: none;
}
.heat-badge.top3 {
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  font-weight: 600;
}
.heat-badge.top10 {
  background: rgba(249,115,22,0.1);
  color: #f97316;
}

/* Animations for strips */
@keyframes stripFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.recent-strip, .popular-strip {
  animation: stripFadeIn 0.3s ease-out;
}

/* Responsive adjustments for strips */
@media (max-width: 480px) {
  .strip-card { min-width: 88px; max-width: 100px; padding: 0.6rem 0.4rem; }
  .strip-card .sc-icon { font-size: 1.25rem; }
  .strip-card .sc-name { font-size: 0.72rem; }
  .popular-strip .strip-card { min-width: 96px; max-width: 110px; }
}

/* Section collapse/expand */
.tools-grid.collapsed .tool-card:nth-child(n+9) { display: none; }
.section-expand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  width: 100%;
  margin-top: .75rem;
  padding: .5rem 1rem;
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--text-light);
  font-size: .82rem;
  cursor: pointer;
  transition: all .2s;
}
.section-expand:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(99,102,241,.04);
}
.section-expand .expand-arrow {
  transition: transform .25s;
  display: inline-block;
}
.section-expand.expanded .expand-arrow { transform: rotate(180deg); }

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .3s, transform .3s, background .2s;
  z-index: 40;
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--primary-dark); }

/* Content protection - prevent casual copying of editorial content */
.hero-skills, .hero-mcp, .info-box p, .skill-card .desc, .tool-card p,
.footer-copy {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
/* Allow selection on interactive elements */
input, textarea, code, pre, .install-cmd, .tool-output, .result,
[contenteditable], .allow-select {
  -webkit-user-select: text !important;
  user-select: text !important;
}
/* Dark mode overrides for inline tool styles */
[data-theme="dark"] .section { background: var(--card); border-color: var(--border); }
[data-theme="dark"] .keys button { background: var(--card); border-color: var(--border); color: var(--text); }
[data-theme="dark"] .keys button:hover { background: #334155; }
[data-theme="dark"] .keys button.op { background: #312e81; color: var(--primary); }
[data-theme="dark"] .keys button.op:hover { background: #3730a3; }
[data-theme="dark"] .keys button.eq { background: var(--primary); }
[data-theme="dark"] .keys button.fn { color: var(--primary); }
[data-theme="dark"] .history-item { border-color: var(--border); color: var(--text-light); }
[data-theme="dark"] .history-item .hi-result { color: var(--text); }
[data-theme="dark"] .tool-panel { background: var(--card); border-color: var(--border); }
[data-theme="dark"] .panel-header { background: var(--card); border-color: var(--border); color: var(--text); }
[data-theme="dark"] textarea,
[data-theme="dark"] .tool-area textarea,
[data-theme="dark"] .tool-area input[type="text"],
[data-theme="dark"] .tool-area select { background: var(--bg); color: var(--text); border-color: var(--border); }
[data-theme="dark"] .feature-card { background: var(--card); border-color: var(--border); }
[data-theme="dark"] .feature-card p { color: var(--text-light); }
[data-theme="dark"] .article-content p { color: var(--text); }
[data-theme="dark"] .article-content pre { background: var(--bg); border-color: var(--border); color: var(--text); }
[data-theme="dark"] .article-content code { background: var(--border); color: var(--text); }
[data-theme="dark"] .score-badge { opacity: 0.9; }
[data-theme="dark"] .ad-slot { display: none; }
[data-theme="dark"] .back-link { color: var(--primary); }

/* ================================================
   Tool Page Components
   Extracted from 60+ inline <style> blocks
   ================================================ */

/* Card section container */
.section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.section h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Form layout */
.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 0.75rem;
}
.form-group {
  flex: 1;
  min-width: 200px;
}
.form-group label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0.375rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.625rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  background: var(--card);
  color: var(--text);
}
.form-group textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

/* Result output area */
.out {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.8;
}
.out-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.out-break {
  word-break: break-all;
}
.out-compact {
  font-size: 0.85rem;
}
.out-large {
  font-size: 0.95rem;
}

/* Muted note text */
.muted {
  color: var(--text-light);
  font-size: 0.8rem;
  margin-top: 0.75rem;
}
.muted-tight {
  margin-top: 0.5rem;
}

/* ================================================
   Article Page Components
   For MCP/Skill/Guide pages (~65 pages)
   ================================================ */

.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: 2rem;
}
.article-content h2 {
  font-size: 1.3rem;
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
}
.article-content h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.75rem;
}
.article-content p {
  line-height: 1.8;
  margin-bottom: 1rem;
  color: var(--text);
}
.article-content ul,
.article-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  line-height: 1.8;
}
.article-content li {
  margin-bottom: 0.5rem;
}
.article-content pre {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  font-family: 'SF Mono', 'Cascadia Code', monospace;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.article-content code {
  background: var(--bg);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: 'SF Mono', 'Cascadia Code', monospace;
  font-size: 0.875rem;
}
.article-content pre code {
  background: none;
  padding: 0;
}

/* Info / Tip / Warning boxes */
.info-box {
  background: var(--info-bg);
  border: 1px solid var(--info-border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--info-text);
}
.tip-box {
  background: var(--tip-bg);
  border: 1px solid var(--tip-border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--tip-text);
}
.warning-box {
  background: var(--warning-bg);
  border: 1px solid var(--warning-text);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--warning-text);
}

/* Feature grid for article pages */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.feature-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  background: var(--card);
}
.feature-card h4 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}
.feature-card p {
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0;
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.back-link:hover {
  text-decoration: underline;
}

/* Score badge for skill pages */
.score-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
}

/* Responsive for tool page components */
@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
  }
  .form-group {
    min-width: 100%;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 1rem;
  }
  .article-content h2 {
    font-size: 1.15rem;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
  .footer-links {
    justify-content: center;
  }
}

/* Print watermark */
@media print {
  body::after {
    content: "来源：aimcp.help - 即时工具 © 2026";
    position: fixed;
    bottom: 10px;
    right: 10px;
    font-size: 12px;
    color: rgba(0,0,0,0.3);
    z-index: 99999;
  }
}

/* 2026-03 curation refresh */
:root {
  --primary: #0f766e;
  --primary-dark: #115e59;
  --bg: #f7fbf8;
  --card: #ffffff;
  --text: #182320;
  --text-light: #5c6b66;
  --border: #d7e1db;
  --success: #15803d;
  --danger: #dc2626;
  --hero-bg: linear-gradient(135deg, #effaf6 0%, #eef6ff 46%, #fff5e7 100%);
  --icon-bg: linear-gradient(135deg, #e7f7f4, #f7fbfa);
  --badge-bg: #edf9f2;
  --surface-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  --surface-shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.05);
}

[data-theme="dark"] {
  --primary: #34d399;
  --primary-dark: #10b981;
  --bg: #0b1210;
  --card: rgba(14, 22, 20, 0.96);
  --text: #ecfdf5;
  --text-light: #9eb0aa;
  --border: #223430;
  --success: #4ade80;
  --danger: #f87171;
  --hero-bg: linear-gradient(135deg, #10201c 0%, #13242f 52%, #2b1f13 100%);
  --icon-bg: linear-gradient(135deg, rgba(20, 83, 75, 0.55), rgba(17, 24, 39, 0.55));
  --badge-bg: rgba(20, 83, 75, 0.35);
  --surface-shadow: 0 20px 48px rgba(0, 0, 0, 0.3);
  --surface-shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.container {
  max-width: 1180px;
  padding: 0 1.25rem;
}

.tools-section {
  padding-top: 2.3rem;
  padding-bottom: 0.5rem;
}

.tools-section h2,
.related-tools h2,
.section h2 {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin-bottom: 1.1rem;
}

.tools-grid {
  gap: 1.1rem;
}

.tool-card .icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--icon-bg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}

.tool-card .badge {
  background: var(--badge-bg);
  color: var(--primary);
  padding: 0.2rem 0.65rem;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
}

.tool-header {
  padding: 2.4rem 0 1.1rem;
}

.breadcrumb {
  margin-bottom: 1.15rem;
  font-size: 0.84rem;
}

.tool-header h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  letter-spacing: -0.03em;
}

.tool-header p {
  max-width: 720px;
  font-size: 1rem;
  line-height: 1.8;
}

.tool-actions {
  justify-content: flex-start;
  gap: 0.65rem;
  padding: 1.1rem 0 1.4rem;
}

.tool-actions--balanced {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
}

.tool-actions--embedded {
  padding: 0;
  margin: 0.9rem 0 0;
}

.tool-actions-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn,
.btn-sm {
  min-height: 44px;
  border-radius: 999px;
  padding: 0.72rem 1.15rem;
  font-weight: 700;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(215, 225, 219, 0.92);
}

[data-theme="dark"] .btn-secondary {
  background: rgba(17, 28, 25, 0.95);
}

.tool-area {
  gap: 1.4rem;
  padding-bottom: 2.25rem;
}

.tool-template-stack {
  display: grid;
  gap: 1rem;
}

.tool-template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.tool-template-grid--aside {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 280px);
  gap: 1.25rem;
  align-items: start;
}

.tool-surface-card {
  min-width: 0;
  padding: 1.1rem;
  border: 1px solid rgba(215, 225, 219, 0.92);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.99), rgba(249,252,250,0.97));
  box-shadow: var(--surface-shadow-soft);
}

[data-theme="dark"] .tool-surface-card {
  border-color: var(--border);
  background: linear-gradient(180deg, rgba(16,24,22,0.98), rgba(8,14,13,0.96));
}

.tool-surface-card--flush {
  padding: 0;
  overflow: hidden;
}

.tool-surface-card h2,
.tool-surface-card h3 {
  letter-spacing: -0.01em;
}

.tool-field-title {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
}

.tool-field-note,
.tool-response-label {
  color: var(--text-light);
}

.tool-field-note {
  font-size: 0.8rem;
}

.tool-response-label {
  margin: 0.5rem 0 0.25rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.tool-panel {
  border-radius: 20px;
  border-color: rgba(215, 225, 219, 0.92);
  background: linear-gradient(180deg, rgba(255,255,255,0.99), rgba(249,252,250,0.97));
}

[data-theme="dark"] .tool-panel {
  background: linear-gradient(180deg, rgba(16,24,22,0.98), rgba(8,14,13,0.96));
}

.panel-header {
  background: rgba(244, 247, 245, 0.88);
  padding: 0.95rem 1.1rem;
}

[data-theme="dark"] .panel-header {
  background: rgba(11, 18, 16, 0.9);
}

.panel-body {
  padding: 1.15rem;
}

.panel-body textarea,
.panel-body input[type="text"],
.panel-body input[type="number"],
.panel-body select {
  border-radius: 14px;
  border: 1px solid rgba(215, 225, 219, 0.92);
  background: rgba(255, 255, 255, 0.68);
}

[data-theme="dark"] .panel-body textarea,
[data-theme="dark"] .panel-body input[type="text"],
[data-theme="dark"] .panel-body input[type="number"],
[data-theme="dark"] .panel-body select {
  background: rgba(11, 18, 16, 0.9);
}

.guide-content,
.blog-content {
  max-width: 860px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(249,252,250,0.98));
  border: 1px solid rgba(215, 225, 219, 0.92);
  border-radius: 28px;
  padding: 2.2rem 1.4rem;
  box-shadow: var(--surface-shadow);
}

[data-theme="dark"] .guide-content,
[data-theme="dark"] .blog-content {
  background: linear-gradient(180deg, rgba(16,24,22,0.98), rgba(8,14,13,0.96));
}

.guide-content h1,
.blog-content h1 {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  letter-spacing: -0.03em;
}

.guide-content h2,
.blog-content h2 {
  color: var(--text);
  border-bottom: 1px solid rgba(215, 225, 219, 0.72);
  padding-bottom: 0.45rem;
}

.info-box,
.faq-item,
.section,
.recent-strip,
.popular-strip {
  border: 1px solid rgba(215, 225, 219, 0.92);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,251,249,0.96));
}

[data-theme="dark"] .info-box,
[data-theme="dark"] .faq-item,
[data-theme="dark"] .section,
[data-theme="dark"] .recent-strip,
[data-theme="dark"] .popular-strip {
  background: linear-gradient(180deg, rgba(16,24,22,0.98), rgba(8,14,13,0.96));
}

.info-box {
  padding: 1.45rem 1.5rem;
}

.section {
  padding: 1.5rem;
}

.footer {
  margin-top: 3.2rem;
  border-top: 1px solid rgba(215, 225, 219, 0.92);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
  transition: background-color .2s ease, border-color .2s ease;
}

[data-theme="dark"] .footer {
  background: rgba(7, 13, 12, 0.94);
}

.footer-links a,
.footer-copy {
  color: var(--text-light);
}

.surface-note,
.directory-note {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid rgba(215, 225, 219, 0.92);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-light);
  font-size: 0.92rem;
  line-height: 1.7;
}

[data-theme="dark"] .surface-note,
[data-theme="dark"] .directory-note {
  background: rgba(17, 28, 25, 0.92);
}

.score-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 32px;
  padding: 0.15rem 0.75rem;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.09);
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.directory-shell {
  padding-top: 2rem;
}

.directory-hero {
  padding: 2.4rem 1.4rem;
  border-radius: 26px;
  color: #f8fffd;
  box-shadow: var(--surface-shadow);
}

.directory-hero .stats {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.4rem;
}

.directory-hero .stat {
  min-width: 120px;
  padding: 0.75rem 0.95rem;
  border-radius: 18px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
}

.directory-hero .num {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
}

.filter-bar {
  gap: 0.85rem;
  margin: 1.55rem 0 1.25rem;
}

.filter-bar input {
  min-height: 52px;
  border-radius: 16px;
  box-shadow: var(--surface-shadow-soft);
}

.cat-pill {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 0.95rem;
  border-radius: 999px;
  font-weight: 600;
}

.cat-pill.active {
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.18);
}

@media (max-width: 768px) {
  .nav-inner {
    height: 62px;
  }

  .nav-links.open {
    top: 62px;
    gap: 0.5rem;
    padding: 1rem 1.1rem 1.2rem;
    background: rgba(255,255,255,0.94);
    backdrop-filter: blur(18px);
  }

  [data-theme="dark"] .nav-links.open {
    background: rgba(11, 18, 16, 0.96);
  }

  .nav-links.open a {
    justify-content: flex-start;
  }

  .hero {
    padding: 3.2rem 1rem 2.3rem;
  }

  .tool-actions {
    justify-content: stretch;
  }

  .tool-actions .btn,
  .tool-actions .btn-sm {
    flex: 1 1 180px;
    justify-content: center;
  }

  .tool-actions--balanced {
    flex-direction: column;
    align-items: stretch;
  }

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

  .guide-content,
  .blog-content {
    border-radius: 22px;
    padding: 1.5rem 1rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.95rem;
  }

  .hero .hero-stats .hs {
    width: 100%;
    justify-content: center;
  }

  .tool-card,
  .tool-panel,
  .info-box,
  .faq-item,
  .section {
    border-radius: 18px;
  }
}

.score-pill {
  display: none;
}

.hero > .surface-note,
.hero-mcp > .surface-note,
.hero-config > .surface-note,
.directory-hero > .surface-note {
  display: none;
}

.footer-links {
  flex-wrap: wrap;
  row-gap: 0.5rem;
}

.nav-actions {
  flex-wrap: nowrap;
}

#lang-toggle,
#theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#lang-toggle {
  width: 56px;
  padding-inline: 0;
}

#theme-toggle {
  width: 44px;
  padding-inline: 0;
}

.nav-logo,
.nav-links,
.tools-grid,
.tool-area,
.section,
.info-box,
.tool-panel,
.guide-content,
.blog-content {
  min-width: 0;
}

main .section,
main .info-box,
main .tool-panel,
main .tool-header {
  width: 100%;
}

.breadcrumb,
.tool-header h1,
.tool-header p,
.back-link,
.tool-card p,
.info-box p,
.section p,
.guide-content p,
.blog-content p,
.guide-content li,
.blog-content li {
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 640px) {
  .tool-actions-group {
    width: 100%;
  }

  .tool-actions-group .btn,
  .tool-actions-group .btn-sm {
    flex: 1 1 180px;
    justify-content: center;
  }
}

.article-content code,
.guide-content code,
.blog-content code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

img,
svg,
canvas,
video,
iframe {
  max-width: 100%;
  height: auto;
}

pre,
.out,
.result,
.install-cmd,
.guide-content pre,
.blog-content pre,
.article-content pre {
  max-width: 100%;
  overflow-x: auto;
}

.guide-content table,
.blog-content table,
.article-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.recent-strip,
.popular-strip {
  padding-top: 0.35rem;
}

.recent-strip .strip-header,
.popular-strip .strip-header {
  margin-bottom: 0.5rem;
}

.recent-strip .strip-title,
.popular-strip .strip-title {
  font-size: 0.9rem;
}

.strip-card {
  min-width: 92px;
  max-width: 112px;
  padding: 0.55rem 0.45rem;
}

@media (max-width: 768px) {
  #pillars .tools-grid,
  #core-tools .tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  #pillars .tool-card,
  #core-tools .tool-card {
    padding: 0.8rem;
  }

  #pillars .tool-card .icon,
  #core-tools .tool-card .icon {
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
  }

  #pillars .tool-card h3,
  #core-tools .tool-card h3 {
    font-size: 0.88rem;
    line-height: 1.35;
  }

  #pillars .tool-card p,
  #core-tools .tool-card p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: 0.72rem;
    line-height: 1.35;
  }

  .filter-pills,
  .cat-pills {
    width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.1rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .filter-pills::-webkit-scrollbar,
  .cat-pills::-webkit-scrollbar {
    display: none;
  }

  .pill,
  .cat-pill {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .filter-bar,
  .filter-bar > * {
    min-width: 0;
  }

  .filter-bar input {
    width: 100%;
    min-width: 0;
  }
}

#pillars .tool-card,
#core-tools .tool-card {
  min-height: 0;
}

#pillars .tool-card p,
#core-tools .tool-card p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
