.tool-shell {
    display: grid;
    gap: 26px;
}

.tool-workspace {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.tool-panel,
.tool-summary-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 24px;
}

.tool-panel-head,
.tool-actions {
    display: flex;
    align-items: center;
}

.tool-panel-head {
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.tool-actions {
    gap: 10px;
    flex-wrap: wrap;
}

.tool-button {
    cursor: pointer;
}

.tool-button.hidden {
    display: none;
}

.tool-textarea {
    width: 100%;
    min-height: 280px;
    resize: vertical;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font: inherit;
    line-height: 1.7;
}

.tool-preview {
    min-height: 280px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.04);
    line-height: 1.85;
    white-space: pre-wrap;
}

.tool-preview.empty-state {
    color: var(--muted);
}

.tool-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.tool-summary-card h3 {
    margin: 0 0 14px;
    font-family: "Space Grotesk", sans-serif;
}

.tool-summary-card.given {
    border-top: 4px solid #5b9dff;
}

.tool-summary-card.question {
    border-top: 4px solid #30b882;
}

.tool-summary-card.keywords {
    border-top: 4px solid #8e70ff;
}

.tool-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.tool-chip-list li {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
}

.tool-chip-list .placeholder {
    color: var(--muted);
}

.tag {
    display: inline;
    padding: 5px 8px;
    margin: 0 1px;
    border-radius: 10px;
    font-weight: 800;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.tag.given {
    background: rgba(91, 157, 255, 0.18);
    color: #b9d4ff;
}

.tag.question {
    background: rgba(48, 184, 130, 0.18);
    color: #baf3db;
}

.tag.keyword {
    background: rgba(142, 112, 255, 0.18);
    color: #d8c9ff;
}

.tool-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 900px) {
    .tool-workspace,
    .tool-summary-grid {
        grid-template-columns: 1fr;
    }
}
