:root {
    --agent-card: #fff;
    --agent-accent: #000000;
    --text-main: #000000;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --grid-color: #f1f1f1;
    --radius-lg: 0px;
    /* Matching the sharp corners in the screenshot */
    --radius-md: 0px;
}

.agent-wrap {
    background: var(--agent-card);
    border: 1px solid var(--border);
    box-shadow: none;
    overflow: hidden;
    position: relative;
}

.agent-header {
    background: #fff;
    padding: 0;
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--border);
}

.dots {
    display: flex;
    gap: 6px;
    padding: 0 20px;
    align-items: center;
    border-right: 1px solid var(--border);
}

.dot {
    width: 8px;
    height: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.dr {
    background: #ff5f57;
}

.dy {
    background: #febc2e;
}

.dg {
    background: #28c840;
}

.atitle {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
    padding: 15px 20px;
    flex-grow: 1;
}

.abadge {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 15px 20px;
    border-left: 1px solid var(--border);
    background: #fafafa;
}

.agent-body {
    padding: 40px;
}

.field-wrap {
    margin-bottom: 32px;
}

.field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

input[type="email"],
textarea {
    width: 100%;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 16px;
    color: var(--text-main);
    font-size: 16px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: #000;
}

textarea {
    min-height: 160px;
    line-height: 1.6;
}

.field-err {
    color: #ef4444;
    font-size: 12px;
    margin-top: 8px;
    display: none;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
    /* Grid style */
    background: var(--border);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.chip {
    font-size: 13px;
    background: #fff;
    padding: 10px 16px;
    cursor: pointer;
    flex-grow: 1;
    text-align: center;
    transition: background 0.2s;
}

.chip:hover {
    background: #f9fafb;
}

.run-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.run-note {
    font-size: 13px;
    color: var(--text-muted);
}

.btn-primary {
    background: #5D2D93 !important;
    color: #fff !important;
    border: none;
    padding: 10px 16px !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: opacity 0.2s;
    border-radius: 8px !important;
}

.btn-primary:hover {
    opacity: 0.8;
}

.btn-primary:disabled {
    background: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

.loading .spinner {
    display: block;
}

/* Result Styles */
#step-result,
#step-limit {
    display: none;
}

.limit-box {
    text-align: center;
    padding: 60px 40px;
    border: 1px solid var(--border);
    background: #fff;
}

.limit-box h2 {
    font-size: 32px !important;
    margin-bottom: 16px !important;
}

.limit-box p {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto 12px auto;
    line-height: 1.6;
}

.result-back {
    display: inline-block;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    margin-bottom: 30px;
    text-decoration: underline;
}

.result-box {
    border: 1px solid var(--border);
}

.rs {
    padding: 30px;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 40px;
}

.rl {
    font-size: 13px;
    font-weight: 600;
    text-transform: none;
    color: var(--text-main);
}

.rt {
    font-size: 16px;
    line-height: 1.6;
    color: #374151;
}

.impact-num {
    font-size: 40px;
    font-weight: 700;
    color: #000;
    letter-spacing: -0.02em;
}

.score-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.score-bg {
    flex-grow: 1;
    height: 2px;
    background: var(--border);
}

.score-fill {
    height: 100%;
}

.score-val {
    font-size: 16px;
    font-weight: 600;
}

.copy-btn {
    width: 100%;
    margin-top: 40px;
    background: #fff;
    border: 1px solid #000;
    color: #000;
    padding: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: #000;
    color: #fff;
}

@media (max-width: 768px) {
    .rs {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    #agent-anchor h2 {
        font-size: 32px;
    }

    .agent-body {
        padding: 24px;
    }

    .run-row {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}