.tools-hero {
    background: #fff;
    color: #1d1d1d;
    padding: 56px 0 40px;
    text-align: center;
    border-bottom: 1px solid #ebebeb;
}
.tools-hero-tag {
    font-size: 14px;
    color: #666;
    margin: 0 0 8px;
}
.tools-hero-title {
    font-size: 32px;
    font-weight: 600;
    margin: 0 0 12px;
    color: #1d1d1d;
}
.tools-hero-desc {
    font-size: 16px;
    color: #555;
    margin: 0 auto;
    max-width: 720px;
}
.tools-grid-wrap {
    padding: 40px 0 64px;
}
.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}
@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
}
.tools-card {
    display: block;
    text-decoration: none;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    position: relative;
    transform: translate3d(0, 0, 0);
    transition:
        transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.32s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.28s ease;
    will-change: transform;
}
.tools-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 0 rgba(184, 29, 34, 0);
    pointer-events: none;
    transition: box-shadow 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
@media (hover: hover) and (pointer: fine) {
    .tools-card:hover {
        transform: translate3d(0, -6px, 0);
        border-color: rgba(184, 29, 34, 0.55);
        box-shadow:
            0 14px 32px rgba(47, 63, 82, 0.12),
            0 4px 12px rgba(184, 29, 34, 0.08);
    }
    .tools-card:hover::after {
        box-shadow: inset 0 0 0 1px rgba(184, 29, 34, 0.35);
    }
    .tools-card:hover .tools-card-head {
        background: linear-gradient(135deg, #2f3f52 0%, #3a4f68 100%);
    }
    .tools-card:hover .tools-card-body {
        background: #e2eaf2;
    }
    .tools-card:hover .tools-card-body p {
        color: #222;
    }
}
.tools-card:active {
    transform: translate3d(0, -2px, 0);
    transition-duration: 0.12s;
}
@media (prefers-reduced-motion: reduce) {
    .tools-card,
    .tools-card-head,
    .tools-card-body,
    .tool-sibling-links a {
        transition: none;
    }
    .tools-card:hover {
        transform: none;
    }
}
.tools-card-head {
    background: #2f3f52;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    padding: 16px 20px;
    transition: background 0.32s ease;
}
.tools-card-body {
    padding: 20px;
    color: #333;
    font-size: 15px;
    line-height: 1.6;
    min-height: 88px;
    background: #e8eef4;
    transition: background 0.32s ease;
}
.tools-card-body p {
    margin: 0;
    transition: color 0.28s ease;
}
.tools-badge {
    display: inline-block;
    margin-top: 12px;
    font-size: 12px;
    color: #b81d22;
    border: 1px solid #b81d22;
    padding: 2px 10px;
    border-radius: 999px;
}

.tool-topbar {
    border-bottom: 1px solid #ebebeb;
    padding: 14px 0;
    background: #fafafa;
}
.tool-breadcrumb a {
    color: #b81d22;
    text-decoration: none;
}
.tool-breadcrumb span {
    color: #999;
    margin: 0 6px;
}
.tool-sibling-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tool-sibling-links a {
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    transition:
        color 0.22s ease,
        border-color 0.22s ease,
        background 0.22s ease,
        transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.22s ease;
}
@media (hover: hover) and (pointer: fine) {
    .tool-sibling-links a:hover {
        border-color: #b81d22;
        color: #b81d22;
        background: #fff5f5;
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(184, 29, 34, 0.1);
    }
}
.tool-sibling-links a.on {
    border-color: #b81d22;
    color: #b81d22;
    background: #fff0f1;
}

.tool-main {
    padding: 32px 0 56px;
}
.tool-page-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}
.tool-page-title h1 {
    font-size: 22px;
    margin: 0;
    color: #1d1d1d;
}
.tool-actions {
    display: flex;
    gap: 10px;
}
.btn-tool {
    display: inline-block;
    padding: 8px 18px;
    font-size: 14px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    color: #333;
    text-decoration: none;
}
.btn-tool.primary {
    background: #b81d22;
    border-color: #b81d22;
    color: #fff;
}
.btn-tool.btn-link {
    border: none;
    background: transparent;
    color: #b81d22;
    padding-left: 0;
}
.cauchy-layout {
    gap: 24px;
    align-items: flex-start;
}
.cauchy-panel {
    flex: 1;
    min-width: 280px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 20px;
    box-sizing: border-box;
}
.cauchy-panel h2 {
    font-size: 16px;
    margin: 0 0 16px;
    color: #1d3a5c;
}
.cauchy-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.cauchy-table th,
.cauchy-table td {
    border: 1px solid #eee;
    padding: 8px;
    text-align: left;
}
.cauchy-table input {
    width: 100%;
    box-sizing: border-box;
    padding: 4px 6px;
    border: 1px solid #ddd;
}
.cauchy-btns {
    gap: 10px;
    margin: 16px 0;
}
.cauchy-paste-label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
}
#cauchy-paste {
    width: 100%;
    box-sizing: border-box;
    font-family: monospace;
    font-size: 13px;
    margin-bottom: 8px;
}
.cauchy-formula {
    font-size: 13px;
    color: #666;
    margin: 16px 0 0;
}
.cauchy-canvas-wrap {
    border: 1px solid #eee;
    background: #fafafa;
    overflow: hidden;
    max-width: 100%;
}
#cauchy-canvas {
    width: 100%;
    height: auto;
    display: block;
    cursor: crosshair;
}
.cauchy-result {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}
.cauchy-calc-row {
    gap: 24px;
    margin-top: 24px;
    align-items: flex-start;
}
.cauchy-calc-row input[type="number"] {
    width: 100%;
    max-width: 200px;
    padding: 8px;
    margin: 8px 0 12px;
    border: 1px solid #ddd;
}
.cauchy-calc-out {
    margin-top: 8px;
    font-size: 15px;
}
.cauchy-tips ol {
    margin: 0;
    padding-left: 20px;
    color: #555;
    font-size: 14px;
    line-height: 1.7;
}
.tool-placeholder .lead {
    font-size: 17px;
    color: #444;
    max-width: 720px;
}
.tool-placeholder p {
    margin: 16px 0;
}

.tool-embed-wrap {
    padding: 0 0 48px;
    background: #f7f8fa;
    box-sizing: border-box;
}
.tool-embed-frame {
    display: block;
    width: 100%;
    min-height: 720px;
    border: 0;
    background: #f7f8fa;
}

@media only screen and (min-width: 1025px) {
    .tool-topbar .marginAuto {
        max-width: 1500px;
    }
    .tool-embed-wrap {
        max-width: 1500px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 24px;
        padding-right: 24px;
    }
}

.header .tools-menu .wrap {
    padding: 12px 0 20px;
}
.header .tools-dropdown-cells .cell {
    min-width: 200px;
    margin-right: 48px;
}

@media only screen and (max-width: 1024px) {
    .tool-topbar .marginAuto {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    .tool-embed-wrap {
        margin-left: 0;
        margin-right: 0;
    }
}
