/*
 * 教師教學文章共用元件
 * 依附於 article-style-standard.css，僅套用在 body.teacher-article。
 * 適用：教師工具指南、教學流程紀錄、跨領域案例集。
 */

body.teacher-article {
    --teacher-panel: #F8FAFC;
    --teacher-panel-strong: #F1F5F9;
    --teacher-code: #111827;
}

body.teacher-article .art-hero-title {
    max-width: 15ch;
}

body.teacher-article .teacher-outline {
    margin-top: 30px;
    padding: 22px 24px;
    background: var(--article-canvas);
    border: 1px solid var(--article-line);
    border-radius: var(--article-radius-md);
}

body.teacher-article .teacher-outline-title {
    margin: 0 0 12px;
    color: var(--article-muted-strong);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

body.teacher-article .teacher-outline-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

body.teacher-article .teacher-outline-list li {
    margin: 0;
}

body.teacher-article .teacher-outline-list a {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    padding: 8px 12px;
    color: var(--article-action-text);
    background: var(--article-paper);
    border: 1px solid var(--article-action-border);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
}

body.teacher-article .teacher-outline-list a:hover {
    background: var(--article-action-soft);
    border-color: var(--article-action);
}

body.teacher-article .teacher-summary-grid,
body.teacher-article .teacher-feature-grid,
body.teacher-article .teacher-use-grid {
    display: grid;
    gap: 16px;
    margin-top: 30px;
}

body.teacher-article .teacher-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.teacher-article .teacher-feature-grid,
body.teacher-article .teacher-use-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.teacher-article .teacher-use-grid {
    align-items: stretch;
}

body.teacher-article :where(.teacher-summary-card, .teacher-feature-card, .teacher-use-card) {
    min-width: 0;
    padding: 22px;
    background: var(--article-paper);
    border: 1px solid var(--article-line);
    border-radius: var(--article-radius-md);
}

body.teacher-article .teacher-summary-card {
    background: var(--article-canvas);
}

body.teacher-article .teacher-summary-label,
body.teacher-article .teacher-feature-label {
    display: block;
    margin-bottom: 10px;
    color: var(--article-brand-text);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

body.art-standard.teacher-article .art-content :where(.teacher-summary-card, .teacher-feature-card, .teacher-use-card) h3 {
    margin: 0 0 8px;
    font-size: 1.04rem;
}

body.art-standard.teacher-article .art-content :where(.teacher-summary-card, .teacher-feature-card, .teacher-use-card) p {
    margin: 0;
    color: var(--article-muted);
    font-size: 0.9rem;
    line-height: 1.72;
}

body.teacher-article .teacher-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

body.teacher-article .teacher-button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    color: var(--article-paper);
    background: var(--article-action);
    border: 1px solid var(--article-action);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.4;
    text-decoration: none;
}

body.teacher-article .teacher-button:hover {
    color: var(--article-paper);
    background: var(--article-action-text);
    border-color: var(--article-action-text);
}

body.teacher-article .teacher-tool-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 18px;
    align-items: center;
    margin-top: 26px;
}

body.teacher-article .teacher-button-large {
    min-height: 54px;
    padding: 14px 24px;
    font-size: 1rem;
}

body.teacher-article .teacher-bookmark-note {
    flex: 1 1 260px;
    margin: 0;
    color: var(--article-muted);
    font-size: 0.86rem;
    line-height: 1.65;
}

body.teacher-article .teacher-resource-card {
    margin-top: 28px;
    padding: clamp(24px, 5vw, 36px);
    background:
        radial-gradient(circle at 100% 0, rgba(8, 145, 178, 0.08), transparent 38%),
        var(--article-brand-soft);
    border: 1px solid var(--article-brand-border);
    border-radius: var(--article-radius-lg);
}

body.art-standard.teacher-article .art-content .teacher-resource-card h3 {
    margin: 0 0 10px;
    font-size: clamp(1.18rem, 2vw, 1.35rem);
}

body.art-standard.teacher-article .art-content .teacher-resource-card > p {
    margin: 0;
    color: var(--article-muted-strong);
}

body.teacher-article .teacher-resource-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 18px;
    align-items: center;
    margin-top: 22px;
}

body.teacher-article .teacher-resource-note {
    flex: 1 1 250px;
    margin: 0;
    color: var(--article-muted);
    font-size: 0.82rem;
    line-height: 1.65;
}

body.teacher-article .teacher-source-link {
    color: var(--article-action-text);
    font-weight: 700;
    text-underline-offset: 3px;
}

body.teacher-article .teacher-check-list {
    display: grid;
    gap: 12px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

body.teacher-article .teacher-check-list li {
    position: relative;
    margin: 0;
    padding-left: 30px;
}

body.teacher-article .teacher-check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--article-brand);
    font-weight: 900;
}

body.teacher-article .teacher-faq {
    display: grid;
    gap: 12px;
    margin-top: 28px;
}

body.teacher-article .teacher-faq details,
body.teacher-article .teacher-disclosure {
    background: var(--article-paper);
    border: 1px solid var(--article-line);
    border-radius: var(--article-radius-md);
}

body.teacher-article .teacher-faq summary,
body.teacher-article .teacher-disclosure summary {
    position: relative;
    padding: 18px 54px 18px 20px;
    cursor: pointer;
    color: var(--article-ink);
    font-weight: 800;
    line-height: 1.6;
    list-style: none;
}

body.teacher-article .teacher-faq summary::-webkit-details-marker,
body.teacher-article .teacher-disclosure summary::-webkit-details-marker {
    display: none;
}

body.teacher-article .teacher-faq summary::after,
body.teacher-article .teacher-disclosure summary::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 20px;
    color: var(--article-action-text);
    font-size: 1.35rem;
    transform: translateY(-50%);
}

body.teacher-article .teacher-faq details[open] summary::after,
body.teacher-article .teacher-disclosure[open] summary::after {
    content: "−";
}

body.teacher-article .teacher-faq-answer,
body.teacher-article .teacher-disclosure-content {
    padding: 0 20px 20px;
    color: var(--article-muted);
    font-size: 0.92rem;
    line-height: 1.75;
}

body.teacher-article .teacher-faq-answer p:last-child,
body.teacher-article .teacher-disclosure-content p:last-child {
    margin-bottom: 0;
}

body.teacher-article .teacher-disclosure + .art-summary-card {
    margin-top: 28px;
}

body.teacher-article .art-inline-figure {
    margin: 34px 0 0;
}

body.teacher-article .art-inline-figure img {
    display: block;
    width: 100%;
    height: auto;
    background: var(--article-canvas);
    border: 1px solid var(--article-line);
    border-radius: var(--article-radius-lg);
    box-shadow: var(--article-shadow);
}

body.teacher-article .art-inline-figure figcaption {
    margin-top: 12px;
    color: var(--article-muted);
    font-size: 0.8rem;
    line-height: 1.65;
    text-align: center;
}

body.teacher-article .teacher-phone-figure {
    max-width: 390px;
    margin-inline: auto;
}

body.teacher-article .art-code-block {
    max-width: 100%;
}

body.teacher-article .art-code-pre {
    max-height: 360px;
}

body.teacher-article .art-video-grid {
    grid-template-columns: minmax(0, 1fr);
}

body.teacher-article .art-video-item {
    width: 100%;
}

@media (max-width: 780px) {
    body.teacher-article .teacher-summary-grid,
    body.teacher-article .teacher-feature-grid,
    body.teacher-article .teacher-use-grid {
        grid-template-columns: 1fr;
    }

    body.teacher-article .teacher-summary-grid {
        gap: 12px;
    }
}

@media (max-width: 520px) {
    body.teacher-article .art-hero-title {
        font-size: clamp(2rem, 9vw, 2.18rem);
    }

    body.teacher-article .teacher-outline {
        padding: 18px;
    }

    body.teacher-article .teacher-outline-list {
        display: grid;
        grid-template-columns: 1fr;
    }

    body.teacher-article .teacher-outline-list a,
    body.teacher-article .teacher-button {
        width: 100%;
    }

    body.teacher-article .teacher-action-row {
        display: grid;
    }

    body.teacher-article .teacher-tool-cta {
        display: grid;
    }

    body.teacher-article .teacher-resource-actions {
        display: grid;
    }

    body.teacher-article .teacher-bookmark-note {
        text-align: center;
    }

    body.teacher-article .teacher-resource-note {
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.teacher-article *,
    body.teacher-article *::before,
    body.teacher-article *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media print {
    body.teacher-article .teacher-outline,
    body.teacher-article .teacher-action-row,
    body.teacher-article .art-section-sim,
    body.teacher-article #art-related {
        display: none !important;
    }

    body.teacher-article :where(.teacher-summary-card, .teacher-feature-card, .teacher-use-card) {
        break-inside: avoid;
        box-shadow: none;
    }
}
