/* 
 * 🌐 GemOS PT-MT Global Base Styles
 * Handles: Tailwind Config, Shared Fonts, and CSS Reset
 */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700&family=Noto+Serif+TC:wght@400;700&display=swap');

/* --- Tailwind Custom Configuration (Via CSS Variables) --- */
:root {
    --color-clinical-blue: #2563eb;    /* Royal Blue */
    --color-clinical-emerald: #059669; /* Rich Emerald */
    --color-clinical-slate: #0f172a;   /* Primary Slate */
    
    /* Light Mode */
    --msa-bg: #ffffff;
    --msa-card-bg: #f8fafc;
    --msa-text: #1e293b;        /* High Contrast Slate 800 */
    --msa-heading: #0f172a;     /* Sharp Slate 900 */
    --msa-border: #e2e8f0;
    --msa-accent-blue: #2563eb;
}

/* 🌙 Midnight Clinic Mode (自動深色模式) */
@media (prefers-color-scheme: dark) {
    :root {
        --msa-bg: #0f172a;      /* Deep Slate 900 */
        --msa-card-bg: #1e293b; /* Mid Slate 800 */
        --msa-text: #f1f5f9;    /* Bright Slate 100 */
        --msa-heading: #ffffff;  /* Pure White */
        --msa-border: #334155;  /* Slate 700 */
        --msa-accent-blue: #60a5fa; /* Lighter Blue for Dark Mode */
    }
}

/* --- UX Improvements --- */
html {
    scroll-behavior: smooth;
}

/* 📖 Reading Progress Bar */
#reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(to right, var(--color-clinical-emerald), var(--color-clinical-blue));
    z-index: 9999;
    transition: width 0.1s ease;
}

/* --- 🖨️ 1% Print Strategy (列印優化) --- */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    .no-print, header, footer, .msa-alert {
        display: none !important;
    }
    article {
        box-shadow: none !important;
        margin: 0 !important;
        width: 100% !important;
    }
    a::after {
        content: " (" attr(href) ")"; /* 列印時自動顯示網址 */
        font-size: 0.8em;
    }
}
