.ghl-tool {
    --ghl-border: #d7dde5;
    --ghl-border-strong: #b8c2d1;
    --ghl-muted: #596579;
    --ghl-soft: #f7f9fc;
    --ghl-text: #172033;
    --ghl-accent: #f5a623;
    --ghl-accent-dark: #172033;
    display: block;
    clear: both;
    width: 100%;
    max-width: none;
    color: var(--ghl-text);
    margin: 1.5rem 0;
}

.ghl-tool,
.ghl-tool * {
    box-sizing: border-box;
}

.ghl-tool__form,
.ghl-tool__card {
    width: 100%;
    max-width: none;
    border: 1px solid var(--ghl-border);
    border-radius: 8px;
    padding: clamp(1rem, 2vw, 1.5rem);
    background: #fff;
    box-shadow: 0 8px 24px rgba(23, 32, 51, .05);
}

.ghl-tool__card h3 {
    margin: 0 0 1rem;
    font-size: clamp(1.15rem, 2vw, 1.45rem);
    line-height: 1.2;
}

.ghl-tool__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.ghl-tool__field {
    display: grid;
    gap: .4rem;
    margin: 0;
}

.ghl-tool__field span {
    color: var(--ghl-muted);
    font-size: .9rem;
    font-weight: 600;
}

.ghl-tool__field input,
.ghl-tool__field select {
    width: 100%;
    min-height: 3.15rem;
    border: 1px solid var(--ghl-border);
    border-radius: 6px;
    padding: .75rem .85rem;
    background: #fff;
    color: var(--ghl-text);
    font: inherit;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.ghl-tool__field input:focus,
.ghl-tool__field select:focus {
    border-color: var(--ghl-accent);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, .2);
    outline: 0;
}

.ghl-tool__field small {
    color: var(--ghl-muted);
    font-size: .82rem;
    line-height: 1.35;
}

.ghl-tool__field--small {
    max-width: 14rem;
}

.ghl-tool__button,
.ghl-tool__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    margin-top: 1.15rem;
    border: 0;
    border-radius: 6px;
    padding: .7rem 1rem;
    background: var(--ghl-accent);
    color: var(--ghl-accent-dark);
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.ghl-tool__button {
    display: flex;
    width: 50%;
    min-width: min(100%, 14rem);
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 8px 18px rgba(245, 166, 35, .25);
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.ghl-tool__button:hover,
.ghl-tool__cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(245, 166, 35, .28);
}

.ghl-tool__button:disabled {
    cursor: progress;
    opacity: .7;
}

.ghl-tool__result {
    margin-top: 1.1rem;
}

.ghl-tool__card p {
    margin: 0 0 1rem;
}

.ghl-tool__result-head {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.1rem;
}

.ghl-tool__result-head h3 {
    margin-bottom: .35rem;
}

.ghl-tool__score {
    min-width: 8rem;
    border: 1px solid var(--ghl-border);
    border-radius: 8px;
    padding: .65rem .75rem;
    text-align: center;
}

.ghl-tool__score span {
    display: block;
    color: var(--ghl-muted);
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.ghl-tool__score strong {
    display: block;
    margin-top: .2rem;
    font-size: 1.2rem;
}

.ghl-tool__score--good {
    border-color: #9bd6b5;
    background: #effaf4;
}

.ghl-tool__score--warn {
    border-color: #f0c36d;
    background: #fff8e8;
}

.ghl-tool__score--bad {
    border-color: #e29a9a;
    background: #fff1f1;
}

.ghl-tool__status {
    display: inline-flex;
    align-items: center;
    min-height: 1.8rem;
    border-radius: 999px;
    padding: .3rem .65rem;
    font-size: .82rem;
    font-weight: 800;
}

.ghl-tool__status--good {
    background: #dcfce7;
    color: #166534;
}

.ghl-tool__status--warn {
    background: #fef3c7;
    color: #92400e;
}

.ghl-tool__status--bad {
    background: #fee2e2;
    color: #991b1b;
}

.ghl-tool__card--error {
    border-color: #d63638;
}

.ghl-tool__rows {
    display: grid;
    gap: 0;
    margin: 0;
    border: 1px solid var(--ghl-border);
    border-radius: 6px;
    overflow: hidden;
}

.ghl-tool__rows div {
    display: grid;
    grid-template-columns: minmax(8rem, 14rem) minmax(0, 1fr);
    border-top: 1px solid var(--ghl-border);
}

.ghl-tool__rows div:first-child {
    border-top: 0;
}

.ghl-tool__rows dt,
.ghl-tool__rows dd {
    display: flex;
    gap: .5rem;
    align-items: flex-start;
    justify-content: space-between;
    margin: 0;
    padding: .65rem .75rem;
    overflow-wrap: anywhere;
}

.ghl-tool__rows dd span {
    min-width: 0;
}

.ghl-tool__rows dt {
    background: var(--ghl-soft);
    color: var(--ghl-muted);
    font-weight: 700;
}

.ghl-tool__meta {
    color: var(--ghl-muted);
    font-size: .85rem;
}

.ghl-tool__section {
    margin-top: 1.15rem;
    border-top: 1px solid var(--ghl-border);
    padding-top: 1rem;
}

.ghl-tool__section h4 {
    margin: 0 0 .65rem;
    font-size: 1rem;
}

.ghl-tool__findings,
.ghl-tool__recommendations,
.ghl-tool__list {
    display: grid;
    gap: .45rem;
    margin: 0;
    padding-left: 1.2rem;
}

.ghl-tool__copy {
    flex: 0 0 auto;
    border: 1px solid var(--ghl-border);
    border-radius: 6px;
    padding: .25rem .45rem;
    background: #fff;
    color: var(--ghl-muted);
    cursor: pointer;
    font-size: .78rem;
    font-weight: 700;
}

.ghl-tool__copy:hover,
.ghl-tool__secondary:hover {
    border-color: var(--ghl-border-strong);
    background: var(--ghl-soft);
}

.ghl-tool__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1rem;
}

.ghl-tool__secondary {
    border: 1px solid var(--ghl-border);
    border-radius: 6px;
    padding: .55rem .75rem;
    background: #fff;
    color: var(--ghl-text);
    cursor: pointer;
    font-weight: 700;
}

.ghl-tool__code {
    max-height: 24rem;
    margin: 0;
    overflow: auto;
    border: 1px solid var(--ghl-border);
    border-radius: 6px;
    padding: .75rem;
    background: #111827;
    color: #f8fafc;
    font-size: .88rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

@media (max-width: 640px) {
    .ghl-tool__rows div {
        grid-template-columns: 1fr;
    }

    .ghl-tool__field--small,
    .ghl-tool__button {
        width: 100%;
        max-width: none;
    }

    .ghl-tool__result-head,
    .ghl-tool__rows dd {
        display: grid;
    }

    .ghl-tool__rows dd {
        border-top: 1px solid var(--ghl-border);
    }
}
