.tools-page-navigation { min-width: 0; }
.tools-breadcrumb { margin-bottom: 20px; font-size: 13px; line-height: 1.5; }
.tools-breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; padding: 0; list-style: none; }
.tools-breadcrumb li { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.tools-breadcrumb a { color: #64748b; text-decoration: none; transition: color 160ms ease; }
.tools-breadcrumb a:hover { color: #087c59; }
.tools-breadcrumb svg { width: 14px; height: 14px; flex: 0 0 auto; color: #94a3b8; }
.tools-breadcrumb [aria-current="page"] { color: #087c59; font-weight: 500; overflow-wrap: anywhere; }
.tools-breadcrumb a:focus-visible { outline: 2px solid #10b981; outline-offset: 4px; border-radius: 3px; }

.tools-switcher { position: relative; min-width: 0; scroll-margin-top: 88px; }
.tools-switcher-track {
    display: flex; align-items: stretch; gap: 16px; overflow-x: auto;
    overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: 4px;
    padding: 4px 2px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.tools-switcher-track::-webkit-scrollbar { display: none; }
.tools-switcher-card {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
    flex: 0 0 176px; min-width: 0; min-height: 132px; padding: 20px 14px;
    border: 1px solid #dce5ed; border-radius: 16px; background: rgba(255, 255, 255, .92);
    color: #334155; text-decoration: none; scroll-snap-align: start;
    transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}
.tools-switcher-number { position: absolute; top: 10px; inset-inline-start: 12px; color: #a5b4ac; font-size: 11px; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; pointer-events: none; }
.tools-switcher-card:hover { border-color: #a7d9c5; background: #fff; }
.tools-switcher-card[aria-current="page"] { border-color: #10b981; background: #fff; box-shadow: inset 0 0 0 1px #10b981; color: #0f172a; }
.tools-switcher-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 46px; height: 46px; border-radius: 14px; background: #f3f6fa; color: #94a3b8; }
.tools-switcher-icon svg { width: 25px; height: 25px; stroke-width: 1.8; }
.tools-switcher-card[aria-current="page"] .tools-switcher-icon { background: #ecfdf5; color: #10b981; }
.tools-switcher-titles { display: flex; flex-direction: column; gap: 4px; width: 100%; min-width: 0; text-align: center; }
.tools-switcher-label { width: 100%; text-align: center; font-size: 14px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.tools-switcher-english { color: var(--tools-ui-subtle, #64748b); font-size: 12px; font-weight: 400; line-height: 1.4; overflow-wrap: anywhere; unicode-bidi: isolate; }
.tools-switcher-card:focus-visible { outline: 2px solid #087c59; outline-offset: 2px; }

.tools-switcher::before, .tools-switcher::after {
    content: ""; position: absolute; top: 2px; bottom: 4px; z-index: 1;
    width: 30px; pointer-events: none; opacity: 0; transition: opacity 160ms ease;
}
.tools-switcher::before { left: 0; background: linear-gradient(90deg, #f8fcfa, transparent); }
.tools-switcher::after { right: 0; background: linear-gradient(270deg, #f8fcfa, transparent); }
.tools-switcher[data-overflow-previous="true"]::before,
.tools-switcher[data-overflow-next="true"]::after { opacity: 1; }
.tools-switcher-scroll-btn {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    display: flex; align-items: center; justify-content: center; width: 36px; height: 36px;
    padding: 0; border: 1px solid #dce5ed; border-radius: 50%; background: #fff; color: #475569;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .08); cursor: pointer;
    transition: color 160ms ease, border-color 160ms ease, opacity 160ms ease;
}
.tools-switcher-scroll-btn[data-direction="previous"] { inset-inline-start: -12px; }
.tools-switcher-scroll-btn[data-direction="next"] { inset-inline-end: -12px; }
.tools-switcher-scroll-btn svg { width: 18px; height: 18px; }
.tools-switcher-scroll-btn:hover { color: #087c59; border-color: #10b981; }
.tools-switcher-scroll-btn:disabled { opacity: 0; pointer-events: none; }
.tools-switcher-scroll-btn:focus-visible { outline: 2px solid #087c59; outline-offset: 3px; }
html[dir="rtl"] .tools-breadcrumb svg, html[dir="rtl"] .tools-switcher-scroll-btn svg { transform: rotate(180deg); }
html[dir="rtl"] .tools-switcher[data-overflow-previous="true"]::before,
html[dir="rtl"] .tools-switcher[data-overflow-next="true"]::after { opacity: 0; }
html[dir="rtl"] .tools-switcher[data-overflow-next="true"]::before,
html[dir="rtl"] .tools-switcher[data-overflow-previous="true"]::after { opacity: 1; }

@media (max-width: 600px) {
    .tools-breadcrumb { font-size: 12px; margin-bottom: 16px; }
    .tools-breadcrumb ol, .tools-breadcrumb li { gap: 6px 8px; }
    .tools-breadcrumb li:last-child { flex: 1 1 auto; }
    .tools-switcher-track { gap: 12px; }
    .tools-switcher-card { flex-basis: 124px; min-height: 112px; padding: 16px 10px; gap: 10px; border-radius: 14px; }
    .tools-switcher-icon { width: 40px; height: 40px; border-radius: 12px; }
    .tools-switcher-icon svg { width: 23px; height: 23px; }
    .tools-switcher-label { font-size: 12px; }
    .tools-switcher-english { font-size: 11px; }
    .tools-switcher-scroll-btn { width: 32px; height: 32px; }
    .tools-switcher-scroll-btn[data-direction="previous"] { inset-inline-start: -8px; }
    .tools-switcher-scroll-btn[data-direction="next"] { inset-inline-end: -8px; }
}
@media (prefers-reduced-motion: reduce) {
    .tools-switcher-card, .tools-switcher-scroll-btn, .tools-switcher::before, .tools-switcher::after, .tools-breadcrumb a { transition: none; }
}
