/* HoxTyping - styles are scoped to this tool only */

#hoxtyping {
    --ht-blue: #245bdb;
    --ht-blue-dark: #1946b3;
    --ht-text: #172033;
    --ht-muted: #667085;
    --ht-border: #e4e9f2;
    --ht-bg: #f5f8ff;
    max-width: 1120px;
    width: calc(100% - 32px);
    margin: 0 auto;
    padding: 38px 0 60px;
    color: var(--ht-text);
    font-family: inherit;
    line-height: 1.6;
    box-sizing: border-box;
}

#hoxtyping *,
#hoxtyping *::before,
#hoxtyping *::after {
    box-sizing: border-box;
}

#hoxtyping .ht-hero {
    text-align: center;
    padding: 26px 12px 32px;
}

#hoxtyping .ht-eyebrow {
    display: inline-block;
    color: var(--ht-blue);
    background: #eaf0ff;
    border-radius: 999px;
    padding: 5px 13px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
}

#hoxtyping .ht-hero h1 {
    margin: 12px 0 0;
    color: var(--ht-text);
    font-size: clamp(36px, 6vw, 58px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.5px;
}

#hoxtyping .ht-hero > p:not(.ht-intro) {
    color: var(--ht-blue);
    font-size: 19px;
    font-weight: 700;
    margin: 8px 0;
}

#hoxtyping .ht-intro {
    max-width: 650px;
    margin: 12px auto 0;
    color: var(--ht-muted);
    font-size: 16px;
}

#hoxtyping .ht-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

#hoxtyping .ht-stat {
    padding: 20px 12px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--ht-border);
    border-radius: 16px;
    box-shadow: 0 5px 18px rgba(22, 43, 82, 0.04);
}

#hoxtyping .ht-stat span {
    display: block;
    color: var(--ht-muted);
    font-size: 13px;
    font-weight: 600;
}

#hoxtyping .ht-stat strong {
    display: block;
    margin-top: 4px;
    font-size: clamp(23px, 4vw, 32px);
    line-height: 1.3;
    color: var(--ht-blue);
    font-variant-numeric: tabular-nums;
}

#hoxtyping .ht-card {
    background: #fff;
    border: 1px solid var(--ht-border);
    border-radius: 20px;
    padding: clamp(16px, 3vw, 28px);
    box-shadow: 0 10px 32px rgba(22, 43, 82, 0.06);
}

#hoxtyping .ht-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 14px;
    margin-bottom: 22px;
}

#hoxtyping .ht-controls label {
    flex: 1 1 180px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: var(--ht-text);
    font-size: 13px;
    font-weight: 700;
}

#hoxtyping select,
#hoxtyping textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid #d5ddeb;
    border-radius: 10px;
    background: #fff;
    color: var(--ht-text);
    font: inherit;
    outline: none;
}

#hoxtyping select {
    min-height: 45px;
    padding: 9px 12px;
}

#hoxtyping select:focus,
#hoxtyping textarea:focus {
    border-color: var(--ht-blue);
    box-shadow: 0 0 0 3px rgba(36, 91, 219, 0.12);
}

#hoxtyping .ht-passage {
    min-height: 155px;
    padding: 22px;
    border: 1px solid #e1e8f6;
    border-radius: 14px;
    background: var(--ht-bg);
    color: #344054;
    font-size: clamp(17px, 2.2vw, 20px);
    line-height: 1.95;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

#hoxtyping .ht-passage .ht-correct {
    color: #15803d;
    background: #dcfce7;
}

#hoxtyping .ht-passage .ht-incorrect {
    color: #b42318;
    background: #fee4e2;
    text-decoration: underline;
    text-decoration-color: #d92d20;
}

#hoxtyping .ht-passage .ht-current {
    border-left: 2px solid var(--ht-blue);
    background: #dbeafe;
}

#hoxtyping .ht-input-label {
    display: block;
    margin: 20px 0 8px;
    font-size: 14px;
    font-weight: 750;
}

#hoxtyping textarea {
    display: block;
    min-height: 120px;
    padding: 14px;
    resize: vertical;
}

#hoxtyping textarea:disabled {
    background: #f8fafc;
    cursor: not-allowed;
}

#hoxtyping .ht-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

#hoxtyping .ht-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid var(--ht-blue);
    border-radius: 10px;
    background: var(--ht-blue);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
}

#hoxtyping .ht-button:hover {
    background: var(--ht-blue-dark);
    transform: translateY(-1px);
}

#hoxtyping .ht-button:focus-visible {
    outline: 3px solid #93b4ff;
    outline-offset: 3px;
}

#hoxtyping .ht-button-secondary {
    background: #fff;
    color: var(--ht-blue);
}

#hoxtyping .ht-button-secondary:hover {
    background: #f0f5ff;
}

#hoxtyping .ht-status {
    margin: 14px 0 0;
    color: var(--ht-muted);
    font-size: 14px;
}

#hoxtyping .ht-result {
    margin-top: 22px;
    padding: 20px;
    border: 1px solid #b9d2ff;
    border-radius: 14px;
    background: #f0f6ff;
}

#hoxtyping .ht-result h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

#hoxtyping .ht-result p {
    margin: 0 0 14px;
}

#hoxtyping .ht-help {
    margin-top: 42px;
}

#hoxtyping .ht-help > h2 {
    margin: 0 0 18px;
    font-size: 25px;
    letter-spacing: -0.4px;
}

#hoxtyping .ht-help-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

#hoxtyping .ht-help-grid article {
    padding: 20px;
    background: #fff;
    border: 1px solid var(--ht-border);
    border-radius: 14px;
}

#hoxtyping .ht-help-grid h3 {
    margin: 0 0 8px;
    font-size: 16px;
}

#hoxtyping .ht-help-grid p {
    margin: 0;
    color: var(--ht-muted);
    font-size: 14px;
}

@media (max-width: 700px) {
    #hoxtyping {
        width: calc(100% - 22px);
        padding-top: 20px;
    }

    #hoxtyping .ht-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    #hoxtyping .ht-stat {
        padding: 15px 8px;
    }

    #hoxtyping .ht-passage {
        padding: 15px;
        min-height: 135px;
    }

    #hoxtyping .ht-help-grid {
        grid-template-columns: 1fr;
    }

    #hoxtyping .ht-controls .ht-button {
        width: 100%;
    }
}

#hoxtyping .ht-custom-box {
    margin: 0 0 20px;
    padding: 18px;
    border: 1px solid var(--ht-border);
    border-radius: 14px;
    background: #f8faff;
}

#hoxtyping .ht-custom-box[hidden] {
    display: none !important;
}

#hoxtyping .ht-custom-box label {
    display: block;
    margin-bottom: 8px;
    font-weight: 750;
}

#hoxtyping #ht-custom-text {
    display: block;
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #d5ddeb;
    border-radius: 10px;
    background: #fff;
    color: var(--ht-text);
    font: inherit;
    resize: vertical;
}

#hoxtyping #ht-custom-count {
    margin: 6px 0 12px;
    color: var(--ht-muted);
    font-size: 13px;
}
#hoxtyping .ht-custom-box[hidden] {
    display: none !important;
}

#hoxtyping .ht-custom-box {
    margin: 0 0 20px;
    padding: 18px;
    border: 1px solid var(--ht-border, #e4e9f2);
    border-radius: 14px;
    background: #f8faff;
}

#hoxtyping #ht-custom-text {
    display: block;
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #d5ddeb;
    border-radius: 10px;
    background: #fff;
    font: inherit;
}

#hoxtyping #ht-custom-count {
    margin: 6px 0 12px;
    font-size: 13px;
}
/* HoxTyping: respect hidden state even if other CSS overrides it */
#hoxtyping #ht-result[hidden],
#hoxtyping .ht-custom-box[hidden] {
    display: none !important;
}