/* =============================================
   БезШтрафа.рф — Articles Stylesheet
   ============================================= */

/* --- Articles Hero --- */
.articles-hero {
    padding: calc(var(--header-height) + var(--space-12)) 0 var(--space-10);
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    text-align: center;
}

.articles-hero__title {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-extrabold);
    color: var(--white);
    margin-bottom: var(--space-4);
}

.articles-hero__subtitle {
    font-size: var(--font-size-md);
    color: rgba(255, 255, 255, 0.65);
    max-width: 640px;
    margin: 0 auto;
    line-height: var(--line-height);
}

/* --- Filter --- */
.articles-filter {
    padding: var(--space-6) 0;
    border-bottom: 1px solid var(--border-color);
    background: var(--white);
    position: sticky;
    top: var(--header-height);
    z-index: 50;
}

.articles-filter__tabs {
    display: flex;
    gap: var(--space-2);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.articles-filter__tabs::-webkit-scrollbar {
    display: none;
}

.articles-filter__tab {
    padding: var(--space-2) var(--space-4);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    flex-shrink: 0;
}

.articles-filter__tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.articles-filter__tab--active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.articles-filter__tab--active:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
}

/* --- Articles Section --- */
.articles-section {
    padding: var(--space-12) 0;
}

/* --- Articles Grid --- */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
}

.articles-grid--related {
    grid-template-columns: repeat(3, 1fr);
}

/* --- Article Card --- */
.article-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
}

.article-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--gray-300);
    transform: translateY(-2px);
}

.article-card__body {
    padding: var(--space-6);
    flex-grow: 1;
}

.article-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.article-card__category {
    flex-shrink: 0;
}

.article-card__read-time {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    white-space: nowrap;
}

.article-card__title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-snug);
    margin-bottom: var(--space-3);
}

.article-card__title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.article-card__title a:hover {
    color: var(--primary);
}

.article-card__excerpt {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    line-height: var(--line-height);
    margin-bottom: var(--space-4);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card__meta {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.article-card__views {
    color: var(--text-light);
}

.article-card__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-6);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--primary);
    background: var(--gray-50);
    border-top: 1px solid var(--border-color);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.article-card__link:hover {
    background: var(--primary-bg);
    color: var(--primary-dark);
}

.article-card__link svg {
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.article-card__link:hover svg {
    transform: translateX(4px);
}

/* --- Articles Empty --- */
.articles-empty {
    text-align: center;
    padding: var(--space-16) 0;
    color: var(--text-muted);
    font-size: var(--font-size-md);
}

/* =============================================
   Single Article
   ============================================= */

/* --- Article Layout --- */
.article__layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--space-10);
    align-items: start;
}

/* --- Article Header --- */
.article__header {
    padding: var(--space-10) 0 var(--space-8);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--space-8);
}

.article__header-meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.article__read-time {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.article__title {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-extrabold);
    line-height: var(--line-height-tight);
    margin-bottom: var(--space-4);
    color: var(--text-primary);
}

.article__dates {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
}

.article__date {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.article__date--modified {
    color: var(--secondary);
}

/* --- Article Content (prose) --- */
.article__content {
    font-size: var(--font-size-base);
    line-height: 1.8;
    color: var(--text-secondary);
}

.article__content h2 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-top: var(--space-12);
    margin-bottom: var(--space-5);
    padding-top: var(--space-4);
    scroll-margin-top: calc(var(--header-height) + var(--space-8));
}

.article__content h3 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-top: var(--space-8);
    margin-bottom: var(--space-4);
    scroll-margin-top: calc(var(--header-height) + var(--space-8));
}

.article__content h4 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-top: var(--space-6);
    margin-bottom: var(--space-3);
}

.article__content p {
    margin-bottom: var(--space-5);
    color: var(--text-secondary);
}

.article__content a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: rgba(230, 57, 70, 0.3);
    text-underline-offset: 2px;
    transition: all var(--transition-fast);
}

.article__content a:hover {
    color: var(--primary-dark);
    text-decoration-color: var(--primary-dark);
}

.article__content ul,
.article__content ol {
    margin-bottom: var(--space-5);
    padding-left: var(--space-6);
}

.article__content ul {
    list-style: disc;
}

.article__content ol {
    list-style: decimal;
}

.article__content li {
    margin-bottom: var(--space-2);
    padding-left: var(--space-2);
    color: var(--text-secondary);
    line-height: 1.7;
}

.article__content li strong {
    color: var(--text-primary);
}

.article__content table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-6) 0;
    font-size: var(--font-size-sm);
    overflow-x: auto;
    display: block;
}

.article__content thead {
    display: table-header-group;
}

.article__content tbody {
    display: table-row-group;
}

.article__content tr {
    display: table-row;
}

.article__content table {
    display: table;
}

.article__content th,
.article__content td {
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--border-color);
    text-align: left;
}

.article__content th {
    background: var(--gray-50);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    white-space: nowrap;
}

.article__content td {
    color: var(--text-secondary);
}

.article__content tbody tr:hover {
    background: var(--gray-50);
}

.article__content blockquote {
    margin: var(--space-6) 0;
    padding: var(--space-5) var(--space-6);
    border-left: 4px solid var(--primary);
    background: var(--gray-50);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    font-style: italic;
    color: var(--text-secondary);
}

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

.article__content code {
    background: var(--gray-100);
    padding: 2px 6px;
    border-radius: var(--border-radius-sm);
    font-size: 0.9em;
    font-family: 'SF Mono', 'Consolas', 'Liberation Mono', monospace;
    color: var(--primary-dark);
}

.article__content pre {
    background: var(--bg-dark);
    color: rgba(255, 255, 255, 0.9);
    padding: var(--space-5);
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin: var(--space-6) 0;
    font-size: var(--font-size-sm);
}

.article__content pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

.article__content img {
    border-radius: var(--border-radius);
    margin: var(--space-6) 0;
    box-shadow: var(--shadow-md);
}

/* --- TOC (Table of Contents) --- */
.article__toc {
    background: var(--gray-50);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: var(--space-6);
    margin-bottom: var(--space-8);
}

.article__toc-title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

.article__toc-list {
    list-style: none !important;
    padding-left: 0 !important;
    margin-bottom: 0 !important;
    counter-reset: toc;
}

.article__toc-list li {
    counter-increment: toc;
    margin-bottom: var(--space-2) !important;
    padding-left: 0 !important;
}

.article__toc-list li::before {
    content: counter(toc) ". ";
    color: var(--primary);
    font-weight: var(--font-weight-medium);
}

.article__toc-list a {
    color: var(--text-secondary);
    text-decoration: none !important;
    font-size: var(--font-size-sm);
    transition: color var(--transition-fast);
}

.article__toc-list a:hover {
    color: var(--primary);
}

/* --- Article CTA --- */
.article__cta {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
    border-radius: var(--border-radius-xl);
    padding: var(--space-10) var(--space-8);
    text-align: center;
    margin: var(--space-12) 0 var(--space-6);
}

.article__cta h3 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--white) !important;
    margin-top: 0 !important;
    margin-bottom: var(--space-3) !important;
}

.article__cta p {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: var(--font-size-base);
    max-width: 500px;
    margin: 0 auto var(--space-6) !important;
}

.article__cta .btn {
    display: inline-flex;
    color: #fff !important;
    text-decoration: none !important;
}

.article__cta-buttons {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.article__cta-buttons .btn--outline {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.4);
}

.article__cta-buttons .btn--outline:hover {
    background: var(--white);
    color: var(--primary);
    border-color: var(--white);
}

/* --- Article Share --- */
.article__share {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-6) 0;
    margin-top: var(--space-8);
    border-top: 1px solid var(--border-color);
}

.article__share-label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
    white-space: nowrap;
}

.article__share-buttons {
    display: flex;
    gap: var(--space-2);
}

.article__share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2) var(--space-4);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
    background: var(--gray-50);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.article__share-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
}

/* --- Article Sidebar --- */
.article__sidebar {
    align-self: start;
}

.article__sidebar-sticky {
    position: sticky;
    top: calc(var(--header-height) + var(--space-8));
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.article__sidebar-cta {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: var(--border-radius-lg);
    padding: var(--space-6);
    text-align: center;
}

.article__sidebar-cta h3 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--white);
    margin-bottom: var(--space-2);
}

.article__sidebar-cta p {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: var(--space-5);
}

.article__sidebar-tools {
    background: var(--gray-50);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: var(--space-5);
}

.article__sidebar-tools h4 {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-4);
}

.article__sidebar-tools ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.article__sidebar-tools li {
    margin-bottom: var(--space-2);
}

.article__sidebar-tools a {
    display: block;
    padding: var(--space-2) var(--space-3);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
}

.article__sidebar-tools a:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

/* --- Related Articles --- */
.article__related {
    padding: var(--space-16) 0;
    background: var(--bg-section);
    border-top: 1px solid var(--border-color);
}

.article__related-title {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    text-align: center;
    margin-bottom: var(--space-10);
}

/* =============================================
   Responsive
   ============================================= */

@media (max-width: 1024px) {
    .article__layout {
        grid-template-columns: 1fr;
    }

    .article__sidebar {
        order: -1;
    }

    .article__sidebar-sticky {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .article__sidebar-cta {
        flex: 1;
        min-width: 250px;
    }

    .article__sidebar-tools {
        flex: 1;
        min-width: 250px;
    }

    .articles-grid--related {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .articles-hero {
        padding: calc(var(--header-height) + var(--space-8)) 0 var(--space-8);
    }

    .articles-hero__title {
        font-size: var(--font-size-2xl);
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .articles-grid--related {
        grid-template-columns: 1fr;
    }

    .article__title {
        font-size: var(--font-size-2xl);
    }

    .article__header {
        padding: var(--space-6) 0 var(--space-5);
    }

    .article__content h2 {
        font-size: var(--font-size-xl);
        margin-top: var(--space-8);
    }

    .article__content h3 {
        font-size: var(--font-size-lg);
        margin-top: var(--space-6);
    }

    .article__content table {
        font-size: var(--font-size-xs);
    }

    .article__content th,
    .article__content td {
        padding: var(--space-2) var(--space-3);
    }

    .article__cta {
        padding: var(--space-8) var(--space-5);
    }

    .article__cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .article__share {
        flex-direction: column;
        align-items: flex-start;
    }

    .article__sidebar-sticky {
        flex-direction: column;
    }

    .article__sidebar-cta,
    .article__sidebar-tools {
        min-width: 0;
    }

    .article__related {
        padding: var(--space-10) 0;
    }

    .article__dates {
        flex-direction: column;
        gap: var(--space-2);
    }
}

@media (max-width: 480px) {
    .articles-filter__tab {
        padding: var(--space-2) var(--space-3);
        font-size: var(--font-size-xs);
    }

    .article-card__body {
        padding: var(--space-4);
    }

    .article-card__title {
        font-size: var(--font-size-base);
    }

    .article__toc {
        padding: var(--space-4);
    }
}

/* =============================================
   Interactive Article Components
   ============================================= */

/* --- FAQ Accordion --- */
.faq-accordion {
    margin: var(--space-8) 0;
}

.faq-accordion__item {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    margin-bottom: var(--space-3);
    overflow: hidden;
    transition: border-color var(--transition-fast);
}

.faq-accordion__item:hover {
    border-color: var(--gray-400);
}

.faq-accordion__item--open {
    border-color: var(--primary);
}

.faq-accordion__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    width: 100%;
    padding: var(--space-5) var(--space-6);
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    text-align: left;
    line-height: var(--line-height-snug);
    transition: background var(--transition-fast);
}

.faq-accordion__question:hover {
    background: var(--gray-50);
}

.faq-accordion__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

.faq-accordion__item--open .faq-accordion__icon {
    background: var(--primary);
    transform: rotate(180deg);
}

.faq-accordion__icon svg {
    width: 14px;
    height: 14px;
    stroke: var(--text-muted);
    transition: stroke var(--transition-fast);
}

.faq-accordion__item--open .faq-accordion__icon svg {
    stroke: var(--white);
}

.faq-accordion__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.faq-accordion__answer-inner {
    padding: 0 var(--space-6) var(--space-6);
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: var(--font-size-base);
}

.faq-accordion__answer-inner p:last-child {
    margin-bottom: 0;
}

/* --- Sign Cards (Correct/Incorrect) --- */
.sign-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    margin: var(--space-6) 0;
}

.sign-card {
    border-radius: var(--border-radius-lg);
    padding: var(--space-5) var(--space-6);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--border-color);
}

.sign-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.sign-card--wrong {
    background: rgba(230, 57, 70, 0.05);
    border: 1px solid rgba(230, 57, 70, 0.2);
}

.sign-card--wrong::before {
    background: var(--error);
}

.sign-card--correct {
    background: rgba(42, 157, 143, 0.05);
    border: 1px solid rgba(42, 157, 143, 0.2);
}

.sign-card--correct::before {
    background: var(--success);
}

.sign-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.sign-card__label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-3);
}

.sign-card--wrong .sign-card__label {
    color: var(--error);
}

.sign-card--correct .sign-card__label {
    color: var(--success);
}

.sign-card__text {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-3);
}

.sign-card__explanation {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.6;
}

.sign-card--open .sign-card__explanation {
    max-height: 200px;
}

.sign-card__hint {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin-top: var(--space-2);
    transition: opacity 0.2s;
}

.sign-card--open .sign-card__hint {
    opacity: 0;
}

/* --- Quiz --- */
.quiz {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--border-radius-xl);
    padding: var(--space-8);
    margin: var(--space-10) 0;
    border: 1px solid var(--border-color);
}

.quiz__title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.quiz__subtitle {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-6);
}

.quiz__progress {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
}

.quiz__dot {
    width: 32px;
    height: 4px;
    border-radius: 2px;
    background: var(--gray-300);
    transition: background 0.3s;
}

.quiz__dot--active {
    background: var(--primary);
}

.quiz__dot--correct {
    background: var(--success);
}

.quiz__dot--wrong {
    background: var(--error);
}

.quiz__question {
    display: none;
}

.quiz__question--active {
    display: block;
}

.quiz__question-text {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-5);
    line-height: var(--line-height-snug);
}

.quiz__options {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.quiz__option {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    font-family: inherit;
    font-size: var(--font-size-base);
    color: var(--text-primary);
    text-align: left;
    transition: all var(--transition-fast);
    width: 100%;
}

.quiz__option:hover:not(.quiz__option--disabled) {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.quiz__option--correct {
    border-color: var(--success) !important;
    background: var(--success-bg) !important;
}

.quiz__option--wrong {
    border-color: var(--error) !important;
    background: var(--error-bg) !important;
}

.quiz__option--disabled {
    cursor: default;
    opacity: 0.7;
}

.quiz__option-marker {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.quiz__option--correct .quiz__option-marker {
    border-color: var(--success);
    background: var(--success);
    color: var(--white);
}

.quiz__option--wrong .quiz__option-marker {
    border-color: var(--error);
    background: var(--error);
    color: var(--white);
}

.quiz__feedback {
    margin-top: var(--space-4);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    line-height: 1.6;
    display: none;
}

.quiz__feedback--visible {
    display: block;
}

.quiz__feedback--correct {
    background: var(--success-bg);
    color: #1a7a6d;
    border: 1px solid rgba(42, 157, 143, 0.2);
}

.quiz__feedback--wrong {
    background: var(--error-bg);
    color: #c0392b;
    border: 1px solid rgba(230, 57, 70, 0.2);
}

.quiz__next {
    margin-top: var(--space-5);
    display: none;
}

.quiz__next--visible {
    display: inline-flex;
}

.quiz__result {
    display: none;
    text-align: center;
    padding: var(--space-6) 0;
}

.quiz__result--visible {
    display: block;
}

.quiz__result-score {
    font-size: 48px;
    font-weight: var(--font-weight-extrabold);
    color: var(--primary);
    margin-bottom: var(--space-2);
}

.quiz__result-text {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
}

/* --- Interactive Fine Calculator --- */
.fine-calc {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-xl);
    padding: var(--space-8);
    margin: var(--space-8) 0;
}

.fine-calc__title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.fine-calc__row,
.fine-calc__group {
    margin-bottom: var(--space-5);
}

.fine-calc__label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.fine-calc__options,
.fine-calc__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.fine-calc__btn {
    padding: var(--space-2) var(--space-4);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--white);
    cursor: pointer;
    font-family: inherit;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.fine-calc__btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.fine-calc__btn--active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.fine-calc__result {
    margin-top: var(--space-6);
    padding: var(--space-6);
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: var(--border-radius-lg);
    text-align: center;
    display: none;
}

.fine-calc__result--visible {
    display: block;
}

.fine-calc__result-label {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: var(--space-2);
}

.fine-calc__result-amount {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-extrabold);
    color: var(--primary-light);
    margin-bottom: var(--space-2);
}

.fine-calc__result-note {
    font-size: var(--font-size-xs);
    color: rgba(255, 255, 255, 0.5);
}

/* --- Interactive Checklist --- */
.checklist {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-xl);
    padding: var(--space-8);
    margin: var(--space-8) 0;
}

.checklist__title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.checklist__header {
    margin-bottom: var(--space-4);
}

.checklist__header h3 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin: 0 0 var(--space-2);
}

.checklist__progress,
.checklist__progress-wrap {
    margin-bottom: var(--space-6);
}

.checklist__progress-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: var(--space-2);
}

.checklist__progress-fill {
    height: 100%;
    background: var(--success);
    border-radius: 4px;
    width: 0%;
    transition: width 0.4s ease;
}

.checklist__progress-text {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.checklist__items,
.checklist > .checklist__item:first-of-type {
    margin-top: 0;
}

.checklist__items {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

/* Items directly in .checklist (without .checklist__items wrapper) */
.checklist > .checklist__item + .checklist__item {
    margin-top: var(--space-3);
}

.checklist__item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background var(--transition-fast);
    user-select: none;
}

.checklist__item:hover {
    background: var(--gray-50);
}

.checklist__checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid var(--gray-400);
    border-radius: var(--border-radius-sm);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
    transition: all var(--transition-fast);
}

.checklist__item--done .checklist__checkbox {
    background: var(--success);
    border-color: var(--success);
}

.checklist__checkbox svg {
    width: 14px;
    height: 14px;
    stroke: var(--white);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.checklist__item--done .checklist__checkbox svg {
    opacity: 1;
}

.checklist__item--done .checklist__item-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

.checklist__item-text {
    font-size: var(--font-size-base);
    color: var(--text-primary);
    line-height: var(--line-height-snug);
}

.checklist__item-text span {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-top: 2px;
    font-weight: normal;
    text-decoration: none !important;
}

/* --- Timeline --- */
.timeline {
    position: relative;
    padding: var(--space-6) 0;
    margin: var(--space-6) 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 18px;
    width: 2px;
    height: 100%;
    background: var(--gray-200);
}

.timeline__item {
    position: relative;
    padding-left: 50px;
    padding-bottom: var(--space-6);
}

.timeline__item:last-child {
    padding-bottom: 0;
}

.timeline__dot {
    position: absolute;
    left: 10px;
    top: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--gray-300);
    z-index: 1;
    transition: all var(--transition-fast);
}

.timeline__item--active .timeline__dot {
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.15);
}

.timeline__item--done .timeline__dot {
    border-color: var(--success);
    background: var(--success);
}

.timeline__date {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: var(--space-1);
}

.timeline__title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.timeline__desc {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    line-height: 1.5;
}

/* --- Case Study Expandable --- */
.case-study {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    margin-bottom: var(--space-4);
    overflow: hidden;
    transition: border-color var(--transition-fast);
}

.case-study:hover {
    border-color: var(--gray-400);
}

.case-study__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-5) var(--space-6);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.case-study__header:hover {
    background: var(--gray-50);
}

.case-study__tag {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    padding: 2px 8px;
    border-radius: var(--border-radius-sm);
    flex-shrink: 0;
}

.case-study__tag--fine {
    background: var(--error-bg);
    color: var(--error);
}

.case-study__tag--warning {
    background: var(--warning-bg);
    color: #b8860b;
}

.case-study__tag--ok {
    background: var(--success-bg);
    color: var(--success);
}

.case-study__title {
    flex-grow: 1;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

.case-study__toggle {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    stroke: var(--text-muted);
    transition: transform var(--transition-base);
}

.case-study--open .case-study__toggle {
    transform: rotate(180deg);
}

.case-study__body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    padding: 0 var(--space-6);
    font-size: var(--font-size-sm);
    line-height: 1.7;
    color: var(--text-secondary);
}

.case-study--open .case-study__body {
    padding-bottom: var(--space-6);
}

.case-study__body > p:last-child {
    margin-bottom: 0;
}

.case-study__body-inner {
    padding: 0;
}

.case-study__body-inner p:last-child {
    margin-bottom: 0;
}

/* --- Sign Cards: Before/After variant --- */
.sign-card:has(.sign-card__before) {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--space-4);
    background: linear-gradient(135deg, rgba(230,57,70,0.03) 0%, rgba(42,157,143,0.03) 100%);
}

.sign-card__before,
.sign-card__after {
    text-align: center;
}

.sign-card__label--bad,
.sign-card__label--good {
    display: block;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-2);
}

.sign-card__label--bad {
    color: var(--error);
}

.sign-card__label--good {
    color: var(--success);
}

.sign-card__before .sign-card__text {
    color: var(--error);
    text-decoration: line-through;
    opacity: 0.65;
    font-size: var(--font-size-base);
}

.sign-card__after .sign-card__text {
    color: var(--success);
    font-weight: var(--font-weight-bold);
}

.sign-card__before + .sign-card__after::before {
    content: '';
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* Arrow between before/after */
.sign-card:has(.sign-card__before)::before {
    content: '\2192';
    position: static;
    width: auto;
    height: auto;
    font-size: 24px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Fallback for browsers without :has() */
@supports not (selector(:has(*))) {
    .sign-card__before {
        margin-bottom: var(--space-2);
        padding-bottom: var(--space-3);
        border-bottom: 1px dashed var(--border-color);
    }
}

/* --- Checklist class aliases (batch articles) --- */
.checklist__check {
    width: 22px;
    height: 22px;
    border: 2px solid var(--gray-400);
    border-radius: var(--border-radius-sm);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
    transition: all var(--transition-fast);
}

.checklist__item--done .checklist__check {
    background: var(--success);
    border-color: var(--success);
}

.checklist__check svg {
    width: 14px;
    height: 14px;
    stroke: var(--white);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.checklist__item--done .checklist__check svg {
    opacity: 1;
}

.checklist__text {
    font-size: var(--font-size-base);
    color: var(--text-primary);
    line-height: var(--line-height-snug);
}

.checklist__item--done .checklist__text {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* --- Case Study: icon/meta/subtitle variant --- */
.case-study__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.case-study__icon svg {
    width: 20px;
    height: 20px;
}

.case-study__meta {
    flex-grow: 1;
    min-width: 0;
}

.case-study__meta .case-study__title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-bottom: 2px;
}

.case-study__subtitle {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

/* --- Interactive Components Responsive --- */
@media (max-width: 768px) {
    .sign-cards {
        grid-template-columns: 1fr;
    }

    .quiz {
        padding: var(--space-5);
    }

    .quiz__question-text {
        font-size: var(--font-size-base);
    }

    .quiz__result-score {
        font-size: 36px;
    }

    .fine-calc {
        padding: var(--space-5);
    }

    .fine-calc__options {
        flex-direction: column;
    }

    .fine-calc__btn {
        text-align: center;
    }

    .checklist {
        padding: var(--space-5);
    }

    .timeline::before {
        left: 14px;
    }

    .timeline__item {
        padding-left: 42px;
    }

    .timeline__dot {
        left: 6px;
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .quiz__option {
        padding: var(--space-3) var(--space-4);
        font-size: var(--font-size-sm);
    }

    .fine-calc__result-amount {
        font-size: var(--font-size-2xl);
    }
}
