:root {
    --nav: #0d1b33;
    --nav-text: #b9c7da;
    --blue: #3b73d9;
    --bg: #edf2f7;
    --card: #fff;
    --line: #d9e2ed;
    --text: #21344b;
    --muted: #59708a;
    --shadow: 0 3px 12px rgba(29, 45, 68, 0.18);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-width: 0;
    background: var(--bg);
    color: var(--text);
    font: 13px/1.55 Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

.home-nav {
    height: 54px;
    background: var(--nav);
    color: var(--nav-text);
    border-bottom: 1px solid #071225;
}

.home-nav-inner {
    width: calc(100% - 32px);
    max-width: 1280px;
    height: 54px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-link {
    position: relative;
    height: 54px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 8px;
    white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
    color: #fff;
}

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 11px;
    right: 11px;
    bottom: 7px;
    height: 2px;
    background: #4f8cff;
}

.nav-link b {
    position: absolute;
    top: 10px;
    right: -2px;
    background: #f7e300;
    color: #111b2c;
    font-size: 9px;
    line-height: 12px;
    padding: 0 3px;
    border-radius: 2px;
}

.nav-home, .nav-wave, .nav-grid {
    width: 13px;
    height: 13px;
    display: inline-block;
    position: relative;
    flex: 0 0 13px;
}

.nav-home::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 5px;
    width: 9px;
    height: 7px;
    border: 2px solid currentColor;
    border-top: 0;
}

.nav-home::after {
    content: "";
    position: absolute;
    left: 2px;
    top: 1px;
    width: 9px;
    height: 9px;
    border-left: 2px solid currentColor;
    border-top: 2px solid currentColor;
    transform: rotate(45deg);
}

.nav-wave::before {
    content: "";
    position: absolute;
    inset: 2px 0;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: skewX(-24deg);
}

.nav-grid::before {
    content: "";
    position: absolute;
    inset: 1px;
    background:
        linear-gradient(currentColor 0 0) left top / 4px 4px no-repeat,
        linear-gradient(currentColor 0 0) right top / 4px 4px no-repeat,
        linear-gradient(currentColor 0 0) left bottom / 4px 4px no-repeat,
        linear-gradient(currentColor 0 0) right bottom / 4px 4px no-repeat;
}

.nav-spacer { flex: 1; }

.settings-link {
    height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ffe500;
    border: 2px solid #ffe500;
    border-radius: 4px;
    padding: 0 10px;
    font-weight: 700;
    white-space: nowrap;
}

.settings-link span {
    width: 12px;
    height: 12px;
    border: 2px solid currentColor;
    border-radius: 50%;
    display: inline-block;
}

.home-page {
    width: calc(100% - 32px);
    max-width: 1280px;
    margin: 0 auto;
    padding: 30px 0 42px;
}

.filter-panel {
    min-height: 84px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: var(--shadow);
    padding: 24px 16px;
    margin-bottom: 26px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.filter {
    height: 38px;
    border: 1px solid #7b8796;
    background: #fff;
    color: #52657a;
    padding: 0 18px;
}

.filter.active {
    background: #697685;
    color: #fff;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px 25px;
}

.tool-card {
    position: relative;
    min-height: 109px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: var(--shadow);
    padding: 18px 18px 16px 66px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 12px;
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.tool-card:hover {
    transform: translateY(-2px);
    border-color: #aebdd0;
    box-shadow: 0 6px 18px rgba(29, 45, 68, 0.22);
}

.tool-icon {
    position: absolute;
    left: 18px;
    top: 23px;
    width: 31px;
    height: 31px;
    background: #4f75cf;
    border-radius: 50%;
}

.tool-icon::before, .tool-icon::after {
    content: "";
    position: absolute;
}

.tool-icon::before {
    inset: 4px 9px;
    border-left: 2px solid #fff;
    border-right: 2px solid #fff;
    border-radius: 50%;
}

.tool-icon::after {
    left: 4px;
    right: 4px;
    top: 14px;
    height: 2px;
    background: #fff;
    box-shadow: 0 -7px 0 -1px #fff, 0 7px 0 -1px #fff;
}

.tool-title {
    font-size: 23px;
    line-height: 30px;
    color: #1d334c;
    letter-spacing: 0;
}

.tool-badge {
    align-self: start;
    background: #e8efff;
    color: #4f75ff;
    border-radius: 4px;
    font-style: normal;
    padding: 2px 5px;
}

.tool-badge.warm {
    background: #fff0d9;
    color: #ff8b14;
}

.tool-desc {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 13px;
}

.tool-card.hidden { display: none; }

@media (max-width: 980px) {
    body { min-width: 0; }

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

@media (max-width: 620px) {
    .home-page {
        width: calc(100% - 20px);
    }

    .filter-panel {
        flex-wrap: wrap;
        padding: 16px;
    }

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