.aeogm-comparison-story {
    --story-blue: #1268f3;
    --story-ink: #0f172a;
    --story-muted: #5f6f89;
    --story-line: #dbe4f0;
    --story-soft: #f6f9fd;
    --story-green: #0a8f63;
    --story-amber: #a05b00;
    margin: 2.4rem 0;
    overflow: hidden;
    border: 1px solid var(--story-line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 20px 54px rgba(15, 23, 42, 0.08);
    color: var(--story-ink);
}

.aeogm-comparison-story__header {
    padding: clamp(1.4rem, 4vw, 2.4rem);
    border-bottom: 1px solid var(--story-line);
    background:
        radial-gradient(circle at 95% 0%, rgba(18, 104, 243, 0.12), transparent 34%),
        #fff;
}

.aeogm-comparison-story__header h2 {
    max-width: 780px;
    margin: 0.2rem 0 0.65rem;
    color: var(--story-ink);
    font: 800 clamp(1.55rem, 4vw, 2.4rem)/1.08 "Barlow", sans-serif;
    letter-spacing: -0.025em;
}

.aeogm-comparison-story__header > p:last-child {
    max-width: 830px;
    margin: 0;
    color: var(--story-muted);
    font-size: 1.02rem;
    line-height: 1.65;
}

.aeogm-comparison-story__eyebrow,
.aeogm-comparison-story__step {
    margin: 0;
    color: var(--story-blue);
    font: 800 0.76rem/1.2 "Inter", sans-serif;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.aeogm-comparison-story__fallback,
.aeogm-comparison-story__mount {
    padding: clamp(1.2rem, 3vw, 2rem);
}

.aeogm-comparison-story__mount {
    display: none;
}

.aeogm-comparison-story.is-enhanced .aeogm-comparison-story__fallback {
    display: none;
}

.aeogm-comparison-story.is-enhanced .aeogm-comparison-story__mount {
    display: block;
}

.aeogm-comparison-story__view + .aeogm-comparison-story__view {
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--story-line);
}

.aeogm-comparison-story__view h3,
.aeogm-story-panel h3 {
    margin: 0.35rem 0 0.55rem;
    color: var(--story-ink);
    font: 800 clamp(1.3rem, 3vw, 1.8rem)/1.12 "Barlow", sans-serif;
}

.aeogm-comparison-story__view p,
.aeogm-story-panel p,
.aeogm-comparison-story__view li,
.aeogm-story-panel li {
    color: var(--story-muted);
    line-height: 1.6;
}

.aeogm-comparison-story__view ul,
.aeogm-story-panel ul {
    margin: 0.85rem 0 0;
    padding-left: 1.15rem;
}

.aeogm-story-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.aeogm-story-tab {
    min-height: 48px;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--story-line);
    border-radius: 12px;
    background: #fff;
    color: var(--story-muted);
    font: 750 0.88rem/1.2 "Inter", sans-serif;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.aeogm-story-tab:hover {
    transform: translateY(-1px);
    border-color: #9fc2f7;
}

.aeogm-story-tab[aria-selected="true"] {
    border-color: var(--story-blue);
    background: #edf5ff;
    color: #0c4eb5;
}

.aeogm-story-tab:focus-visible,
.aeogm-story-action-button:focus-visible {
    outline: 3px solid rgba(18, 104, 243, 0.25);
    outline-offset: 3px;
}

.aeogm-story-panel {
    min-height: 280px;
    padding: clamp(1.15rem, 3vw, 1.7rem);
    border: 1px solid var(--story-line);
    border-radius: 18px;
    background: var(--story-soft);
}

.aeogm-story-panel__tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    margin-bottom: 0.2rem;
    padding: 0.32rem 0.68rem;
    border-radius: 999px;
    background: #e5efff;
    color: #164da5;
    font: 800 0.7rem/1 "Inter", sans-serif;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.aeogm-story-question {
    margin: 1rem 0;
    padding: 0.85rem 1rem;
    border-left: 4px solid var(--story-blue);
    border-radius: 0 12px 12px 0;
    background: #fff;
    color: var(--story-ink);
    font-weight: 750;
}

.aeogm-story-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr);
    gap: 1rem;
    align-items: start;
}

.aeogm-comparison-story__engine-list,
.aeogm-story-engine-list {
    display: grid;
    gap: 0.65rem;
    margin-top: 1rem;
}

.aeogm-comparison-story__engine,
.aeogm-story-engine {
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 0.7rem;
    padding: 0.82rem;
    border: 1px solid var(--story-line);
    border-radius: 14px;
    background: #fff;
}

.aeogm-story-engine img,
.aeogm-comparison-story__engine img {
    display: block;
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.aeogm-story-engine__top,
.aeogm-comparison-story__engine > div {
    min-width: 0;
}

.aeogm-story-engine__top {
    display: flex;
    justify-content: space-between;
    gap: 0.7rem;
    align-items: center;
}

.aeogm-story-engine strong,
.aeogm-comparison-story__engine strong {
    color: var(--story-ink);
}

.aeogm-story-engine span,
.aeogm-comparison-story__engine span {
    display: inline-block;
    margin-left: 0.35rem;
    color: var(--story-muted);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.aeogm-story-engine--cited span,
.aeogm-comparison-story__engine--cited span {
    color: var(--story-green);
}

.aeogm-story-engine--missed span,
.aeogm-comparison-story__engine--missed span {
    color: var(--story-amber);
}

.aeogm-story-engine p,
.aeogm-comparison-story__engine p {
    margin: 0.35rem 0 0;
    color: var(--story-muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

.aeogm-story-engine__url {
    overflow: hidden;
    color: #2762b6;
    font: 500 0.75rem/1.3 "JetBrains Mono", monospace;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aeogm-story-action {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 0.75rem;
    align-items: start;
    padding: 0.9rem 0;
}

.aeogm-story-action + .aeogm-story-action {
    border-top: 1px solid var(--story-line);
}

.aeogm-story-action__number {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    background: var(--story-blue);
    color: #fff;
    font-weight: 800;
}

.aeogm-story-action strong {
    display: block;
    margin-bottom: 0.15rem;
    color: var(--story-ink);
}

.aeogm-story-action p {
    margin: 0;
    font-size: 0.9rem;
}

.aeogm-story-action-button {
    display: inline-flex;
    justify-content: center;
    margin-top: 0.9rem;
    padding: 0.75rem 1rem;
    border: 0;
    border-radius: 12px;
    background: var(--story-ink);
    color: #fff;
    font: 750 0.85rem/1 "Inter", sans-serif;
    cursor: pointer;
}

.aeogm-comparison-story__disclosure {
    margin: 0;
    padding: 1rem clamp(1.2rem, 3vw, 2rem);
    border-top: 1px solid var(--story-line);
    background: #fbfcfe;
    color: #718096;
    font-size: 0.75rem;
    line-height: 1.5;
}

@media (max-width: 720px) {
    .aeogm-story-tabs,
    .aeogm-story-layout {
        grid-template-columns: 1fr;
    }

    .aeogm-story-tabs {
        position: static;
    }

    .aeogm-story-tab {
        text-align: left;
    }

    .aeogm-story-panel {
        min-height: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .aeogm-story-tab {
        transition: none;
    }
}
