/* =========================================================
   ABRPLUS INFRASTRUCTURE TOOLBOX
========================================================= */

.tools-page {
    margin: 0;
    color: #172033;
    background: #f7f9fc;
}

.tools-page * {
    box-sizing: border-box;
}

.tools-page a {
    text-decoration: none;
}

.tools-page button,
.tools-page input,
.tools-page select {
    font: inherit;
}

.tools-page .container {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

/* Header */
.tools-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #e5eaf1;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(16px);
}

.tools-header-inner {
    min-height: 86px;
    display: grid;
    grid-template-columns: minmax(230px,1fr) auto minmax(230px,1fr);
    align-items: center;
    gap: 24px;
}

.tools-brand {
    justify-self: start;
}

.tools-brand img {
    width: auto;
    max-width: 230px;
    height: 66px;
    display: block;
    object-fit: contain;
}

.tools-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    white-space: nowrap;
}

.tools-nav a {
    position: relative;
    padding: 31px 0 28px;
    color: #354156;
    font-size: 14px;
    font-weight: 800;
}

.tools-nav a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 22px;
    width: 0;
    height: 2px;
    background: #2563eb;
    transition: width .2s ease;
}

.tools-nav a:hover,
.tools-nav a.active {
    color: #0b1220;
}

.tools-nav a:hover::after,
.tools-nav a.active::after {
    width: 100%;
}

.tools-consult {
    min-height: 45px;
    padding: 0 16px;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    color: #fff;
    background: #2563eb;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.tools-menu-toggle,
.tools-mobile-menu {
    display: none;
}

/* Hero */
.tools-hero {
    position: relative;
    overflow: hidden;
    padding: 86px 0 92px;
    color: #fff;
    background:
        radial-gradient(circle at 12% 18%,rgba(37,99,235,.18),transparent 30%),
        radial-gradient(circle at 86% 72%,rgba(14,165,233,.07),transparent 25%),
        linear-gradient(125deg,#07111f,#0a1628 55%,#07101c);
}

.tools-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .18;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(148,163,184,.08) 1px,transparent 1px),
        linear-gradient(90deg,rgba(148,163,184,.08) 1px,transparent 1px);
    background-size: 56px 56px;
}

.tools-hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr .92fr;
    align-items: center;
    gap: 80px;
}

.tools-kicker {
    color: #60a5fa;
    font-family: Arial,sans-serif;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.7px;
}

.tools-hero h1 {
    max-width: 690px;
    margin: 15px 0 0;
    color: #f8fafc;
    font-size: clamp(43px,5vw,64px);
    font-weight: 900;
    line-height: 1.48;
    letter-spacing: -.8px;
}

.tools-hero h1 span {
    color: #60a5fa;
}

.tools-hero-copy > p {
    max-width: 650px;
    margin: 20px 0 0;
    color: #a8b5c7;
    font-size: 15px;
    line-height: 2.1;
}

.tools-hero-links {
    margin-top: 29px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tools-primary,
.tools-secondary {
    min-height: 48px;
    padding: 0 17px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 900;
}

.tools-primary {
    color: #fff;
    background: #2563eb;
}

.tools-secondary {
    color: #b8c5d5;
    border: 1px solid #2a3d57;
    background: rgba(255,255,255,.025);
}

.tools-console {
    overflow: hidden;
    border: 1px solid #243851;
    border-radius: 15px;
    background: rgba(5,14,26,.72);
    box-shadow: 0 35px 80px rgba(0,0,0,.25);
}

.tools-console-top,
.tools-console-foot {
    min-height: 48px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border-bottom: 1px solid #1c2c40;
    color: #61738b;
    font-family: Arial,sans-serif;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 1px;
}

.tools-console-top > div {
    display: flex;
    gap: 5px;
}

.tools-console-top i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2c405a;
}

.tools-console-body {
    padding: 10px 18px;
}

.console-line {
    min-height: 58px;
    display: grid;
    grid-template-columns: 30px 85px 1fr auto;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #17283b;
    font-family: Arial,sans-serif;
    font-size: 9px;
}

.console-line:last-child {
    border-bottom: 0;
}

.console-line > span {
    color: #40536d;
}

.console-line strong {
    color: #c7d3e2;
    font-size: 9px;
}

.console-line em {
    color: #687b93;
    font-style: normal;
}

.console-line b {
    color: #34d399;
    font-size: 7px;
    letter-spacing: .8px;
}

.tools-console-foot {
    border-top: 1px solid #1c2c40;
    border-bottom: 0;
}

.tools-console-foot strong {
    color: #4f8fe9;
    font-size: 7px;
}

/* Directory */
.tools-directory {
    padding: 100px 0 110px;
    background: #fff;
}

.tools-section-heading {
    margin-bottom: 30px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 45px;
}

.tools-section-heading > div > span {
    color: #2563eb;
    font-family: Arial,sans-serif;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.4px;
}

.tools-section-heading h2 {
    margin: 8px 0 0;
    color: #0b1220;
    font-size: clamp(28px,3vw,39px);
    font-weight: 900;
}

.tools-section-heading p {
    max-width: 470px;
    margin: 0;
    color: #6b778a;
    font-size: 12px;
    line-height: 2;
}

.tools-filter {
    margin-bottom: 25px;
    display: flex;
    gap: 7px;
    overflow-x: auto;
    scrollbar-width: none;
}

.tools-filter::-webkit-scrollbar {
    display: none;
}

.tools-filter button {
    min-height: 38px;
    padding: 0 13px;
    flex: 0 0 auto;
    border: 1px solid #e0e6ee;
    border-radius: 7px;
    color: #64748b;
    background: #fff;
    cursor: pointer;
    font-size: 10px;
    font-weight: 800;
}

.tools-filter button:hover,
.tools-filter button.active {
    color: #fff;
    border-color: #172033;
    background: #172033;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 15px;
}

.tool-card {
    min-height: 315px;
    padding: 23px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: right;
    border: 1px solid #e0e6ee;
    border-radius: 14px;
    color: inherit;
    background: #fff;
    cursor: pointer;
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
    border-color: #c7d6e8;
    box-shadow: 0 20px 45px rgba(15,23,42,.08);
}

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

.tool-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tool-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #2563eb;
    background: #eff6ff;
    font-family: Arial,sans-serif;
    font-size: 11px;
    font-weight: 900;
}

.tool-status {
    padding: 5px 8px;
    border-radius: 999px;
    color: #047857;
    background: #ecfdf5;
    font-size: 8px;
    font-weight: 900;
}

.tool-eyebrow {
    margin-top: 25px;
    color: #8492a6;
    font-family: Arial,sans-serif;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 1.2px;
}

.tool-card > strong {
    margin-top: 7px;
    color: #172033;
    font-family: Arial,sans-serif;
    font-size: 18px;
}

.tool-description {
    margin-top: 11px;
    color: #6c798c;
    font-size: 11px;
    line-height: 2;
}

.tool-launch {
    margin-top: auto;
    padding-top: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #2563eb;
    border-top: 1px solid #edf0f4;
    font-size: 10px;
    font-weight: 900;
}

.tool-launch i {
    font-style: normal;
    font-size: 16px;
}

/* Calculators */
.calculator-zone {
    background: #f7f9fc;
}

.calculator-panel {
    display: none;
    scroll-margin-top: 105px;
    padding: 95px 0;
}

.calculator-panel.is-open {
    display: block;
}

.calculator-heading {
    margin-bottom: 30px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 25px;
}

.calculator-heading > div > span {
    color: #2563eb;
    font-family: Arial,sans-serif;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.3px;
}

.calculator-heading h2 {
    margin: 7px 0 0;
    color: #0b1220;
    font-family: Arial,sans-serif;
    font-size: 32px;
}

.calculator-heading p {
    margin: 8px 0 0;
    color: #6d798c;
    font-size: 12px;
}

.calculator-close {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    border: 1px solid #dce3eb;
    border-radius: 8px;
    color: #5c697b;
    background: #fff;
    cursor: pointer;
    font-family: Arial,sans-serif;
    font-size: 22px;
}

.calculator-layout {
    display: grid;
    grid-template-columns: minmax(300px,.72fr) minmax(0,1.28fr);
    gap: 18px;
}

.calculator-form,
.calculator-result {
    padding: 28px;
    border: 1px solid #e0e6ee;
    border-radius: 14px;
    background: #fff;
}

.calculator-form {
    display: grid;
    gap: 17px;
}

.calculator-form label {
    display: grid;
    gap: 8px;
    color: #445267;
    font-size: 10px;
    font-weight: 900;
}

.calculator-form input,
.calculator-form select {
    width: 100%;
    min-height: 47px;
    padding: 0 13px;
    direction: ltr;
    border: 1px solid #dbe3ec;
    border-radius: 7px;
    outline: 0;
    color: #172033;
    background: #f9fbfd;
    font-family: Arial,sans-serif;
    font-size: 13px;
}

.calculator-form input:focus,
.calculator-form select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.08);
}

.calculator-form button {
    min-height: 48px;
    border: 0;
    border-radius: 7px;
    color: #fff;
    background: #2563eb;
    cursor: pointer;
    font-size: 11px;
    font-weight: 900;
}

.calculator-result {
    color: #fff;
    border-color: #1e3048;
    background:
        radial-gradient(circle at 85% 20%,rgba(37,99,235,.15),transparent 27%),
        #0b1728;
}

.result-label {
    color: #60a5fa;
    font-family: Arial,sans-serif;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 1.3px;
}

.result-grid {
    margin-top: 22px;
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 10px;
}

.result-grid > div {
    min-height: 92px;
    padding: 17px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid #22364f;
    border-radius: 9px;
    background: rgba(255,255,255,.025);
}

.result-grid small {
    color: #73869f;
    font-family: Arial,sans-serif;
    font-size: 8px;
}

.result-grid strong {
    margin-top: 8px;
    color: #eaf2fb;
    direction: ltr;
    font-family: Arial,sans-serif;
    font-size: 18px;
    text-align: right;
}

/* Note */
.tools-note {
    padding: 85px 0;
    border-top: 1px solid #e2e8f0;
    background: #f7f9fc;
}

.tools-note-inner {
    padding: 27px 30px;
    display: grid;
    grid-template-columns: 180px 1fr;
    align-items: center;
    gap: 30px;
    border-right: 3px solid #2563eb;
    background: #fff;
}

.tools-note-inner span {
    color: #2563eb;
    font-family: Arial,sans-serif;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.2px;
}

.tools-note-inner p {
    margin: 0;
    color: #66758a;
    font-size: 12px;
    line-height: 2;
}

/* Footer */
.tools-footer {
    border-top: 1px solid #e0e6ee;
    background: #fff;
}

.tools-footer-inner {
    min-height: 115px;
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 40px;
    color: #7b8798;
    font-size: 10px;
}

.tools-footer-inner > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.tools-footer-inner img {
    width: auto;
    height: 49px;
}

.tools-footer-inner > div span {
    color: #8793a5;
    font-family: Arial,sans-serif;
    font-size: 8px;
}

.tools-footer nav {
    display: flex;
    gap: 18px;
}

.tools-footer nav a {
    color: #536176;
    font-size: 10px;
    font-weight: 800;
}

/* Responsive */
@media (max-width: 1050px) {
    .tools-header-inner {
        grid-template-columns: 1fr auto auto;
    }

    .tools-nav {
        display: none;
    }

    .tools-menu-toggle {
        width: 43px;
        height: 43px;
        padding: 10px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        border: 1px solid #dfe6ef;
        border-radius: 8px;
        background: #fff;
    }

    .tools-menu-toggle span {
        width: 100%;
        height: 2px;
        background: #172033;
    }

    .tools-mobile-menu {
        padding: 15px 20px 20px;
        display: none;
        grid-template-columns: repeat(2,1fr);
        gap: 8px;
        border-top: 1px solid #e7ebf1;
        background: #fff;
    }

    .tools-mobile-menu.is-open {
        display: grid;
    }

    .tools-mobile-menu a {
        padding: 11px;
        border-radius: 6px;
        color: #344054;
        background: #f7f9fc;
        font-size: 12px;
        font-weight: 800;
    }

    .tools-hero-grid {
        gap: 45px;
    }

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

@media (max-width: 760px) {
    .tools-page .container {
        width: min(100% - 28px,1180px);
    }

    .tools-header-inner {
        min-height: 74px;
        gap: 10px;
    }

    .tools-brand img {
        max-width: 175px;
        height: 51px;
    }

    .tools-consult {
        display: none;
    }

    .tools-hero {
        padding: 60px 0 68px;
    }

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

    .tools-hero h1 {
        font-size: 37px;
    }

    .tools-directory {
        padding: 72px 0 80px;
    }

    .tools-section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
    }

    .calculator-layout {
        grid-template-columns: 1fr;
    }

    .calculator-panel {
        padding: 70px 0;
    }

    .tools-note {
        padding: 65px 0;
    }

    .tools-note-inner {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tools-footer-inner {
        padding: 28px 0;
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .tools-footer nav {
        flex-wrap: wrap;
    }
}

@media (max-width: 520px) {
    .tools-mobile-menu {
        grid-template-columns: 1fr;
    }

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

    .tools-hero h1 {
        font-size: 32px;
    }

    .console-line {
        grid-template-columns: 25px 70px 1fr auto;
        gap: 7px;
        font-size: 8px;
    }

    .tool-card {
        min-height: 285px;
    }

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

    .calculator-form,
    .calculator-result {
        padding: 21px;
    }
}
