.adt-widget {
    margin: 1.5rem 0;
    padding: 1.25rem;
    border: 1px solid #dbe4f0;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.adt-scenario-bar,
.adt-widget-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.adt-scenario-bar {
    margin-bottom: 1rem;
}

.adt-scenario-bar button,
.adt-widget-controls button,
.adt-choice-btn {
    appearance: none;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    padding: 0.65rem 1rem;
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
}

.adt-scenario-bar button:hover,
.adt-widget-controls button:hover,
.adt-choice-btn:hover {
    transform: translateY(-1px);
    border-color: #64748b;
}

.adt-scenario-bar span {
    color: #475569;
    font-weight: 800;
}

.adt-question-card,
.adt-feedback-card,
.adt-model-card {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: #f8fafc;
}

.adt-question-card h3,
.adt-feedback-card h3 {
    margin: 0.35rem 0 0.55rem;
    color: #0f172a;
}

.adt-label {
    display: block;
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.adt-requirements {
    margin: 0.85rem 0 0;
    padding-left: 1.25rem;
}

.adt-choice-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.adt-choice-btn {
    display: grid;
    gap: 0.25rem;
    justify-items: start;
    border-radius: 18px;
    text-align: left;
}

.adt-choice-btn strong {
    color: #0f172a;
    font-size: 1.05rem;
}

.adt-choice-btn span {
    color: #64748b;
    font-size: 0.88rem;
}

.adt-choice-btn.is-selected {
    border-color: #6366f1;
    background: #eef2ff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.adt-choice-btn.is-correct {
    border-color: #16a34a;
    background: #f0fdf4;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.10);
}

.adt-choice-btn.is-incorrect {
    border-color: #dc2626;
    background: #fef2f2;
}

.adt-feedback-card.is-correct {
    border-color: #86efac;
    background: #f0fdf4;
    color: #14532d;
}

.adt-feedback-card.is-incorrect {
    border-color: #fecaca;
    background: #fef2f2;
    color: #7f1d1d;
}

.adt-model-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.adt-model-header strong {
    color: #0f172a;
}

.adt-model {
    min-height: 175px;
    display: grid;
    place-items: center;
    padding: 1rem;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    background: #ffffff;
    overflow: hidden;
}

.adt-model-caption {
    margin: 0.85rem 0 0;
    color: #475569;
}

.adt-stack-model {
    display: flex;
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 0.35rem;
    width: min(220px, 100%);
}

.adt-stack-item {
    padding: 0.65rem;
    border: 1px solid #c7d2fe;
    border-radius: 12px;
    background: #eef2ff;
    color: #312e81;
    font-weight: 800;
    text-align: center;
    animation: adtRiseIn 0.45s ease both;
}

.adt-stack-item.is-top {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.adt-queue-model {
    width: 100%;
}

.adt-queue-labels {
    display: flex;
    justify-content: space-between;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.adt-queue-items {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
    margin: 0.5rem 0;
}

.adt-queue-item {
    padding: 0.75rem 0.4rem;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    background: #f0f9ff;
    color: #075985;
    font-weight: 800;
    text-align: center;
    animation: adtSlideIn 0.45s ease both;
}

.adt-queue-item.is-front {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.11);
}

.adt-linked-model {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    overflow-x: auto;
    padding: 0.5rem;
}

.adt-node {
    min-width: 88px;
    display: grid;
    grid-template-columns: 1fr auto;
    border: 1px solid #f9a8d4;
    border-radius: 12px;
    background: #fdf2f8;
    color: #831843;
    overflow: hidden;
    animation: adtNodeIn 0.45s ease both;
}

.adt-node-value,
.adt-node-link {
    padding: 0.7rem 0.55rem;
    font-weight: 800;
    text-align: center;
}

.adt-node-link {
    border-left: 1px solid #f9a8d4;
}

.adt-link-arrow {
    color: #be185d;
    font-size: 1.3rem;
    font-weight: 900;
}

.adt-empty-model {
    color: #64748b;
    text-align: center;
}

.adt-widget-controls {
    margin-top: 1rem;
    justify-content: flex-end;
}

.adt-intro-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.adt-intro-card {
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #f8fafc;
}

.adt-intro-card h3 {
    margin-top: 0;
}

.decision-steps li {
    margin-bottom: 0.8rem;
}

@keyframes adtRiseIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes adtSlideIn {
    from {
        opacity: 0;
        transform: translateX(14px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes adtNodeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 850px) {
    .adt-choice-grid,
    .adt-intro-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .adt-widget {
        padding: 1rem;
        border-radius: 20px;
    }

    .adt-scenario-bar {
        justify-content: center;
    }

    .adt-linked-model {
        justify-content: flex-start;
    }
}