.tools-skip {
    position: absolute;
    left: 12px;
    top: -40px;
    z-index: 200;
    background: #fff;
    color: #15212f;
    padding: 8px 12px;
}

.tools-skip:focus {
    top: 8px;
}

.tools-page main {
    max-width: 1080px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.tools-kicker {
    margin: 0 0 8px;
    color: #0b6f85;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tools-page h1 {
    margin: 0 0 12px;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    line-height: 1.15;
}

.tools-lead {
    max-width: 68ch;
    margin: 0 0 20px;
    color: #3d4c5c;
}

.tools-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 20px;
    align-items: start;
}

.tools-panel,
.tools-card {
    background: #fff;
    border: 1px solid #dbe2ea;
    border-radius: 16px;
    padding: 18px;
}

.tools-form {
    display: grid;
    gap: 14px;
}

.tools-form fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}

.tools-form legend {
    margin-bottom: 8px;
    font-weight: 700;
}

.tools-dims,
.tools-pair {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.tools-pair {
    grid-template-columns: 1fr 1fr;
}

.tools-form label,
.tools-field span {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 700;
}

.tools-form input,
.tools-form select,
.tools-snippet {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #c5d0dc;
    border-radius: 10px;
    background: #fff;
    color: #15212f;
    font: inherit;
    font-size: 16px;
}

.tools-form button,
.tools-panel .button,
.tools-cta .button {
    min-height: 44px;
}

.tools-note,
.tools-assumptions li,
.tools-page .field-note {
    color: #5d6b7a;
    font-size: 14px;
}

.tools-result {
    display: grid;
    gap: 12px;
}

.tools-mid {
    margin: 0;
}

.tools-mid-value {
    display: block;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.tools-band {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tools-band li {
    flex: 1 1 120px;
    margin: 0;
    padding: 10px 12px;
    background: #f4f7fa;
    border-radius: 10px;
}

.tools-band strong {
    display: block;
    font-variant-numeric: tabular-nums;
}

.tools-sample {
    margin: 0 0 20px;
    padding: 14px 16px;
    background: #f3fafc;
    border: 1px solid #b7dbe3;
    border-radius: 14px;
}

.tools-sample p {
    margin: 0 0 6px;
}

.tools-sample p:last-child {
    margin-bottom: 0;
}

.tools-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.tools-card h2 {
    margin-top: 0;
}

.tools-card p {
    color: #3d4c5c;
}

.tools-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.tools-page .tools-cta .button,
.tools-embed .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
}

.tools-embed {
    margin: 0;
    background: #f7f9fb;
    color: #15212f;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    line-height: 1.5;
}

.tools-embed .button.primary {
    background: #0b6f85;
    color: #fff;
}

.tools-embed .button.secondary {
    background: #fff;
    color: #084f60;
    border: 1px solid #0b6f85;
}

.tools-backlink {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 16px 20px;
    font-size: 14px;
}

.tools-backlink-top {
    padding-top: 12px;
    padding-bottom: 0;
}

.tools-backlink a {
    color: #0b6f85;
    font-weight: 700;
}

.tools-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tools-panel,
.tools-layout,
.tools-page main {
    min-width: 0;
}

.tools-panel,
.tools-layout {
    max-width: 100%;
}

.tools-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 15px;
}

.tools-table th,
.tools-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #dbe2ea;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
}

.tools-table tr.is-selected {
    background: #f3fafc;
}

.tools-status {
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff6e8;
}

.tools-section {
    margin-top: 28px;
}

.tools-snippet {
    min-height: 7.5em;
    margin-bottom: 10px;
    font-family: ui-monospace, "Cascadia Code", monospace;
    font-size: 13px;
    resize: vertical;
}

.tools-assumptions {
    margin: 0;
    padding-left: 18px;
}

@media (max-width: 900px) {
    .tools-page .site-header {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        height: auto !important;
        min-height: 0 !important;
        row-gap: 0;
        padding: 8px 16px 10px !important;
    }

    .tools-page .site-header .brand {
        order: 1;
    }

    .tools-page .site-header .header-actions {
        order: 2;
        display: flex;
        width: auto;
        margin-left: auto !important;
    }

    .tools-page .site-header .nav-links {
        order: 3;
        display: flex !important;
        flex: 1 1 100% !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        width: 100%;
        min-width: 0;
        gap: 4px 14px;
        padding-top: 0;
        border-top: 0;
        overflow: visible;
    }

    .tools-page .nav-links > a {
        width: auto !important;
        min-height: 44px;
        padding: 8px 0;
    }

    .tools-page .header-actions .button {
        min-height: 44px;
    }
}

@media (max-width: 800px) {
    .tools-layout,
    .tools-cards,
    .tools-dims,
    .tools-pair {
        grid-template-columns: 1fr;
    }

    .tools-note,
    .tools-lead,
    .tools-backlink {
        overflow-wrap: anywhere;
    }
}
