/* ===== nase.me 公共样式 ===== */
:root {
    --bg: #f0f2f5;
    --card: #fff;
    --text: #1a1a2e;
    --text2: #555;
    --text3: #999;
    --accent: #2563eb;
    --accent-h: #1d4ed8;
    --accent-l: #eff6ff;
    --accent-g: rgba(37, 99, 235, 0.15);
    --bdr: #e8e8e8;
    --sh: 0 2px 8px rgba(0, 0, 0, 0.06);
    --sh-h: 0 4px 16px rgba(0, 0, 0, 0.1);
    --r: 12px;
    --rs: 8px;
    --tr: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f1117;
        --card: #181b25;
        --text: #e8e8f0;
        --text2: #a0a0b8;
        --text3: #666680;
        --accent: #3b82f6;
        --accent-h: #60a5fa;
        --accent-l: #172554;
        --accent-g: rgba(59, 130, 246, 0.12);
        --bdr: #2a2d3a;
        --sh: 0 2px 8px rgba(0, 0, 0, 0.25);
        --sh-h: 0 4px 16px rgba(0, 0, 0, 0.35);
    }
}
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: -apple-system, "Segoe UI", Roboto, "Noto Sans SC", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a {
    color: var(--accent);
    text-decoration: none;
}
a:hover {
    color: var(--accent-h);
}

/* Cards */
.card {
    background: var(--card);
    border-radius: var(--r);
    padding: 20px;
    box-shadow: var(--sh);
    border: 1px solid var(--bdr);
    margin-bottom: 16px;
}
.empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--text3);
}
.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.6;
}

/* Skeleton */
.sk {
    animation: pulse 1.5s ease-in-out infinite;
}
.sk-card {
    background: var(--card);
    border-radius: var(--r);
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--bdr);
}
.sk-line {
    height: 14px;
    background: var(--bdr);
    border-radius: 6px;
    margin-bottom: 10px;
}
.sk-line.w60 {
    width: 60%;
}
.sk-line.w80 {
    width: 80%;
}
.sk-line.w45 {
    width: 45%;
    height: 18px;
    margin-bottom: 16px;
}
@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Analysis */

.a-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bdr);
}
.a-icon {
    font-size: 18px;
}
.a-title {
    font-size: 15px;
    font-weight: 700;
}
.a-meta {
    margin-left: auto;
    font-size: 11px;
    color: var(--text3);
    background: var(--bg);
    padding: 2px 8px;
    border-radius: var(--rs);
}
.a-body {
    font-size: 14px;
    line-height: 1.85;
    color: var(--text2);
}
.a-body p {
    margin-bottom: 12px;
}
.a-body h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin: 24px 0 12px;
    padding-top: 16px;
    border-top: 1px solid var(--bdr);
}
.a-body h3:first-child {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}
.a-body h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin: 14px 0 8px;
}
.a-body strong {
    color: var(--text);
    font-weight: 600;
}
.a-body ul {
    list-style: none;
    padding: 0;
    margin: 8px 0;
}
.a-body li {
    padding: 4px 0 4px 16px;
    position: relative;
}
.a-body li::before {
    content: "›";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}
.a-body blockquote {
    margin: 12px 0;
    padding: 8px 12px;
    border-left: 3px solid var(--bdr);
    color: var(--text3);
    font-style: italic;
}
.a-body pre {
    margin: 12px 0;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--rs);
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.5;
}
.a-body code {
    font-size: 13px;
    background: var(--bg);
    padding: 1px 4px;
    border-radius: 3px;
}
.a-body pre code {
    padding: 0;
    background: none;
}
.a-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 13px;
}
.a-body th,
.a-body td {
    padding: 6px 10px;
    border: 1px solid var(--bdr);
    text-align: left;
}
.a-body th {
    background: var(--bg);
    font-weight: 600;
}
.a-body a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Structured badges */
.a-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bdr);
}
.badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 9px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}
.badge-up {
    background: rgba(22, 163, 74, 0.1);
    color: #16a34a;
}
.badge-down {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}
.badge-flat {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}
.badge-mix {
    background: rgba(217, 119, 6, 0.1);
    color: #d97706;
}
.badge-risk-h {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}
.badge-risk-m {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}
.badge-risk-l {
    background: rgba(22, 163, 74, 0.1);
    color: #16a34a;
}
.tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 500;
    background: var(--accent-l);
    color: var(--accent);
    border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
}
.outlook {
    font-size: 12.5px;
    color: var(--text2);
    line-height: 1.5;
    padding: 8px 12px;
    background: var(--bg);
    border-radius: var(--rs);
    margin-bottom: 14px;
}
.outlook::before {
    content: "🔮 ";
}

/* News list */
.news-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 8px;
    border-bottom: 1px solid var(--bdr);
    border-radius: var(--rs);
    transition: background var(--tr);
}
.news-item:hover {
    background: var(--accent-l);
}
.news-item:last-child {
    border-bottom: none;
}
.news-title {
    font-size: 13.5px;
    color: var(--text2);
    line-height: 1.5;
    flex: 1;
    min-width: 0;
}
.news-title a {
    color: inherit;
}
.news-title a:hover {
    color: var(--accent);
}
.news-src {
    font-size: 11px;
    color: var(--text3);
    white-space: nowrap;
    flex-shrink: 0;
}
.news-date {
    font-size: 11px;
    color: var(--text3);
    white-space: nowrap;
    flex-shrink: 0;
}
.news-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bdr);
}
.news-head-icon {
    font-size: 18px;
}
.news-head-title {
    font-size: 15px;
    font-weight: 700;
}
.news-head-count {
    margin-left: auto;
    font-size: 11px;
    color: var(--text3);
    background: var(--bg);
    padding: 2px 8px;
    border-radius: var(--rs);
}
.load-more {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 12px;
    background: var(--accent-l);
    color: var(--accent);
    border: none;
    border-radius: var(--rs);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--tr);
    font-family: inherit;
}
.load-more:hover {
    background: var(--accent);
    color: #fff;
}
.load-more:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Nav bar */
.nav-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--card);
    border-bottom: 1px solid var(--bdr);
    flex-shrink: 0;
    grid-column: 1/-1;
}
.nav-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-right: auto;
}
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: var(--rs);
    font-size: 13px;
    font-weight: 500;
    color: var(--text2);
    cursor: pointer;
    transition: all var(--tr);
    text-decoration: none;
}
.nav-link:hover {
    background: var(--accent-l);
    color: var(--accent);
}
.nav-link.active {
    background: var(--accent-l);
    color: var(--accent);
    font-weight: 700;
}
.nav-link-icon {
    font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
    .sk {
        animation: none;
    }
    .nav-link,
    .load-more {
        transition: none;
    }
}
