.hra-iq-app,
.hra-iq-app * {
    box-sizing: border-box;
}

.hra-iq-app {
    --hra-iq-bg: #f5f7fb;
    --hra-iq-card: #ffffff;
    --hra-iq-text: #172033;
    --hra-iq-muted: #607089;
    --hra-iq-primary: #5b5df7;
    --hra-iq-primary-dark: #393bd0;
    --hra-iq-soft: #eef0ff;
    --hra-iq-border: #dfe4f2;
    --hra-iq-success: #0f8f5f;
    --hra-iq-error: #c44545;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--hra-iq-text);
    max-width: 920px;
    margin: 32px auto;
    padding: 0 12px;
}

.hra-iq-card {
    background:
        radial-gradient(circle at top left, rgba(91, 93, 247, 0.14), transparent 34%),
        var(--hra-iq-card);
    border: 1px solid var(--hra-iq-border);
    border-radius: 28px;
    box-shadow: 0 18px 50px rgba(23, 32, 51, 0.12);
    padding: clamp(22px, 4vw, 42px);
    overflow: hidden;
}

.hra-iq-kicker,
.hra-iq-category {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--hra-iq-soft);
    color: var(--hra-iq-primary-dark);
    font-weight: 800;
    border-radius: 999px;
    padding: 8px 14px;
    margin-bottom: 14px;
}

.hra-iq-card h2 {
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.02;
    margin: 0 0 18px;
    letter-spacing: -0.04em;
}

.hra-iq-card h3 {
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.14;
    margin: 12px 0 22px;
    letter-spacing: -0.025em;
}

.hra-iq-lead {
    color: var(--hra-iq-muted);
    font-size: 1.15rem;
    line-height: 1.65;
    max-width: 760px;
}

.hra-iq-disclaimer {
    background: #fff7dd;
    border: 1px solid #f2df9a;
    border-radius: 18px;
    padding: 14px 16px;
    margin: 18px 0 24px;
    line-height: 1.5;
}

.hra-iq-label {
    display: block;
    font-weight: 800;
    margin: 18px 0 8px;
}

.hra-iq-label span {
    color: var(--hra-iq-muted);
    font-weight: 600;
}

.hra-iq-input {
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--hra-iq-border);
    border-radius: 16px;
    padding: 14px 16px;
    font-size: 1rem;
    outline: none;
}

.hra-iq-input:focus {
    border-color: var(--hra-iq-primary);
    box-shadow: 0 0 0 4px rgba(91, 93, 247, 0.15);
}

.hra-iq-intro-grid,
.hra-iq-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.hra-iq-intro-grid div,
.hra-iq-summary-grid div {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--hra-iq-border);
    border-radius: 18px;
    padding: 15px;
    font-weight: 800;
    text-align: center;
}

.hra-iq-summary-grid strong {
    display: block;
    font-size: 2rem;
}

.hra-iq-summary-grid span {
    color: var(--hra-iq-muted);
    font-size: 0.95rem;
}

.hra-iq-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: var(--hra-iq-primary);
    color: #fff;
    padding: 14px 24px;
    min-height: 50px;
    font-weight: 900;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    box-shadow: 0 12px 24px rgba(91, 93, 247, 0.26);
}

.hra-iq-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(91, 93, 247, 0.32);
}

.hra-iq-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.hra-iq-secondary {
    background: #e9ecf8;
    color: var(--hra-iq-text);
    box-shadow: none;
}

.hra-iq-topbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    color: var(--hra-iq-muted);
    font-weight: 800;
    margin-bottom: 12px;
}

.hra-iq-progress {
    height: 12px;
    background: #e9ecf8;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 22px;
}

.hra-iq-progress span {
    display: block;
    height: 100%;
    background: var(--hra-iq-primary);
    border-radius: inherit;
    transition: width 0.3s ease;
}

.hra-iq-visual,
.hra-iq-memory {
    margin: 16px 0 24px;
}

.hra-iq-sequence,
.hra-iq-symbols,
.hra-iq-attention,
.hra-iq-memory,
.hra-iq-letter-shape {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 86px;
    background: #f7f8fc;
    border: 1px solid var(--hra-iq-border);
    border-radius: 22px;
    font-size: clamp(28px, 5vw, 46px);
    font-weight: 900;
    letter-spacing: 0.04em;
    text-align: center;
    padding: 18px;
}

.hra-iq-memory {
    background: #f0fff7;
    border-color: #bdebd5;
}

.hra-iq-memory.is-hidden-memory {
    background: #f7f8fc;
    color: var(--hra-iq-muted);
    font-size: clamp(17px, 3vw, 24px);
    letter-spacing: normal;
}

.hra-iq-grid,
.hra-iq-matrix {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 360px;
    margin: 0 auto;
}

.hra-iq-grid span,
.hra-iq-matrix div {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 72px;
    background: #f7f8fc;
    border: 1px solid var(--hra-iq-border);
    border-radius: 18px;
    font-size: 32px;
    font-weight: 900;
}

.hra-iq-shape {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 180px;
}

.hra-iq-shape svg {
    width: 150px;
    height: 150px;
    fill: var(--hra-iq-primary);
}

.hra-iq-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.hra-iq-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    border: 2px solid var(--hra-iq-border);
    border-radius: 18px;
    background: #fff;
    color: var(--hra-iq-text);
    padding: 14px;
    text-align: left;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 800;
}

.hra-iq-option:hover,
.hra-iq-option.is-selected {
    border-color: var(--hra-iq-primary);
    background: var(--hra-iq-soft);
}

.hra-iq-option-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e9ecf8;
    color: var(--hra-iq-primary-dark);
    font-weight: 900;
}

.hra-iq-options-visual .hra-iq-option {
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.hra-iq-options-visual svg {
    width: 92px;
    height: 92px;
    fill: var(--hra-iq-primary);
}

.hra-iq-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.hra-iq-feedback {
    text-align: center;
}

.hra-iq-result-icon {
    font-size: 62px;
    line-height: 1;
    margin-bottom: 10px;
}

.hra-iq-explanation {
    max-width: 680px;
    margin: 20px auto;
    background: #f7f8fc;
    border: 1px solid var(--hra-iq-border);
    border-radius: 18px;
    padding: 18px;
    text-align: left;
}

.hra-iq-feedback.is-correct .hra-iq-result-icon {
    color: var(--hra-iq-success);
}

.hra-iq-feedback.is-wrong .hra-iq-result-icon {
    color: var(--hra-iq-error);
}

.hra-iq-score {
    color: var(--hra-iq-primary);
}

.hra-iq-band,
.hra-iq-profile,
.hra-iq-save-status {
    background: #f7f8fc;
    border: 1px solid var(--hra-iq-border);
    border-radius: 20px;
    padding: 18px;
    margin: 16px 0;
}

.hra-iq-band p {
    margin-bottom: 0;
    color: var(--hra-iq-muted);
    line-height: 1.55;
}

.hra-iq-profile {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hra-iq-profile-emoji {
    font-size: 46px;
}

.hra-iq-profile-title {
    color: var(--hra-iq-muted);
    font-weight: 800;
}

.hra-iq-stat-row {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) 2fr 60px;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
    font-weight: 800;
}

.hra-iq-stat-bar {
    height: 14px;
    background: #e9ecf8;
    border-radius: 999px;
    overflow: hidden;
}

.hra-iq-stat-bar span {
    display: block;
    height: 100%;
    background: var(--hra-iq-primary);
    border-radius: inherit;
}

.hra-iq-noscript {
    background: #fff7dd;
    border: 1px solid #f2df9a;
    border-radius: 14px;
    padding: 12px;
}

@media (max-width: 720px) {
    .hra-iq-intro-grid,
    .hra-iq-summary-grid,
    .hra-iq-options {
        grid-template-columns: 1fr;
    }

    .hra-iq-stat-row {
        grid-template-columns: 1fr;
    }

    .hra-iq-topbar {
        align-items: flex-start;
        flex-direction: column;
    }
}
