/**
 * Sumry — Front-end styles.
 *
 * Three style variants: default, minimal, card.
 * Respects prefers-reduced-motion.
 */

/* ── Base ─────────────────────────────────────────────────────────────────── */

.sumry {
    margin: 1.5em 0;
    font-family: inherit;
    line-height: 1.6;
    color: inherit;
}

.sumry__header {
    margin-bottom: 0.5em;
}

.sumry__title {
    font-size: 1.1em;
    font-weight: 600;
    margin: 0 0 0.25em;
    padding: 0;
    line-height: 1.3;
}

.sumry__content {
    font-size: 0.95em;
}

.sumry__content p {
    margin: 0 0 0.75em;
}

.sumry__content p:last-child {
    margin-bottom: 0;
}

.sumry__content ul {
    margin: 0 0 0.75em;
    padding-left: 1.4em;
    list-style: disc;
}

.sumry__content ul:last-child {
    margin-bottom: 0;
}

.sumry__content li {
    margin-bottom: 0.35em;
    line-height: 1.55;
}

.sumry__content li:last-child {
    margin-bottom: 0;
}

/* ── Default style ────────────────────────────────────────────────────────── */

.sumry--default {
    padding: 1.25em 1.5em;
    background: #f7f7f8;
    border-left: 4px solid #3858e9;
    border-radius: 4px;
}

.sumry--default .sumry__title {
    color: #3858e9;
}

/* ── Minimal style ────────────────────────────────────────────────────────── */

.sumry--minimal {
    padding: 1em 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.sumry--minimal .sumry__title {
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
}

/* ── Card style ───────────────────────────────────────────────────────────── */

.sumry--card {
    padding: 1.5em;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.sumry--card .sumry__title {
    color: #333;
}

/* ── Reveal animation ─────────────────────────────────────────────────────── */

.sumry[data-animation="reveal"] {
    opacity: 0;
    transform: translateY(14px);
    transition-property: opacity, transform;
    transition-timing-function: ease-out;
}

.sumry[data-animation="reveal"].sumry--visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Typewriter cursor ────────────────────────────────────────────────────── */

/* Applied by JS to the element currently being typed. */
.sumry__content li.sumry--typing::after,
.sumry__content p.sumry--typing::after {
    content: '|';
    display: inline-block;
    margin-left: 1px;
    color: currentColor;
    opacity: 1;
    animation: sumry-blink 0.65s step-end infinite;
}

@keyframes sumry-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* ── Accessibility: respect reduced motion ────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .sumry[data-animation="reveal"] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
