* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
}

/* ========== Header ========== */
.header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 1.25rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header__title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.header__nav { display: flex; gap: 0.5rem; }

.nav-btn {
    padding: 0.4rem 1.1rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: inherit;
    transition: all 0.15s;
}
.nav-btn:hover { background: #f1f5f9; }
.nav-btn.active { background: #1e293b; color: white; border-color: #1e293b; }

/* ========== Toolbar ========== */
.toolbar {
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-bottom: 1px solid #e2e8f0;
}

.toolbar__filters { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.filter-btn {
    padding: 0.3rem 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    font-size: 0.78rem;
    font-family: inherit;
    transition: all 0.15s;
}
.filter-btn:hover { border-color: var(--cat-color, #94a3b8); }
.filter-btn.active {
    background: var(--cat-color, #1e293b);
    color: white;
    border-color: var(--cat-color, #1e293b);
}

/* ========== Toggle ========== */
.toggle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.85rem;
    user-select: none;
}
.toggle input { display: none; }
.toggle__slider {
    width: 36px;
    height: 20px;
    background: #cbd5e1;
    border-radius: 10px;
    position: relative;
    transition: background 0.2s;
}
.toggle__slider::after {
    content: '';
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.2s;
}
.toggle input:checked + .toggle__slider { background: #3B82F6; }
.toggle input:checked + .toggle__slider::after { transform: translateX(16px); }

/* ========== Timeline ========== */
.timeline {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 2rem 4rem;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 130px;
    top: 2rem;
    bottom: 4rem;
    width: 2px;
    background: #e2e8f0;
}

.timeline-year {
    font-size: 1.4rem;
    font-weight: 800;
    color: #94a3b8;
    margin: 2.5rem 0 1rem;
    padding-left: 160px;
    letter-spacing: 0.05em;
}
.timeline-year:first-child { margin-top: 0; }

.timeline-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    position: relative;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.timeline-item__date {
    width: 110px;
    flex-shrink: 0;
    text-align: right;
    padding-right: 1.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    padding-top: 0.85rem;
    line-height: 1.3;
}

.timeline-item__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--cat-color);
    border: 3px solid #f8fafc;
    box-shadow: 0 0 0 2px var(--cat-color);
    position: absolute;
    left: 125px;
    top: 0.9rem;
    z-index: 2;
    flex-shrink: 0;
}

.timeline-item__content {
    margin-left: 42px;
    flex: 1;
    min-width: 0;
}

.timeline-item__card {
    background: white;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border-left: 3px solid var(--cat-color);
    transition: box-shadow 0.2s, transform 0.2s;
}
.timeline-item__card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateX(2px);
}

.timeline-item__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    flex-wrap: wrap;
}

.timeline-item__category {
    font-size: 0.68rem;
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    background: var(--cat-color);
    color: white;
    font-weight: 500;
    white-space: nowrap;
}

.timeline-item__location {
    font-size: 0.75rem;
    color: #94a3b8;
}
.timeline-item__location::before { content: '\1F4CD '; }

.timeline-item__title {
    font-size: 1rem;
    font-weight: 650;
    margin-bottom: 0.4rem;
    line-height: 1.4;
}

.timeline-item__detail {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.75;
}

.timeline-item__wealth {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}
.wealth__label {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.05rem 0.35rem;
    border-radius: 3px;
    color: white;
}
.wealth--networth { color: #0369a1; background: #e0f2fe; }
.wealth--networth .wealth__label { background: #0369a1; }
.wealth--income { color: #059669; background: #ecfdf5; }
.wealth--income .wealth__label { background: #059669; }
.wealth--expense { color: #b45309; background: #fffbeb; }
.wealth--expense .wealth__label { background: #b45309; }
.wealth--loss { color: #dc2626; background: #fef2f2; }
.wealth--loss .wealth__label { background: #dc2626; }

/* ========== Verification Badge ========== */
.verification-badge {
    font-size: 0.72rem;
    padding: 0.15rem 0.55rem;
    border-radius: 4px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.5rem;
}
.verification--correct { background: #dcfce7; color: #15803d; }
.verification--wrong { background: #fee2e2; color: #dc2626; }
.verification--partial { background: #ffedd5; color: #c2410c; }
.verification--delayed { background: #fef9c3; color: #a16207; }
.verification--pending { background: #f1f5f9; color: #64748b; }
.verification--unverified { background: #f1f5f9; color: #64748b; }
.verification--subjective { background: #f3e8ff; color: #7c3aed; }

/* ========== Video Link ========== */
.timeline-item__video {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #3B82F6;
    text-decoration: none;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    background: #eff6ff;
    transition: background 0.15s, color 0.15s;
}
.timeline-item__video:hover { background: #dbeafe; color: #2563eb; }

/* ========== Statement Image ========== */
.timeline-item__image {
    margin-top: 0.6rem;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}
.timeline-item__image img {
    display: block;
    max-width: 100%;
    height: auto;
    cursor: pointer;
    transition: transform 0.2s;
}
.timeline-item__image img:hover { transform: scale(1.01); }

.image-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    animation: fadeIn 0.2s ease;
}
.image-overlay img {
    max-width: 92vw;
    max-height: 92vh;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

/* ========== Home Quotes ========== */
.home__quotes {
    margin: 1.5rem auto;
    max-width: 480px;
    text-align: center;
}
.home__quote {
    font-size: 1.05rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
    line-height: 1.6;
    font-style: italic;
}
.home__quote-source {
    font-size: 0.78rem;
    color: #94a3b8;
}
.home__intro--emphasis {
    font-weight: 600;
    color: #334155;
}

/* ========== Glossary ========== */
.glossary-term {
    border-bottom: 1px dashed #94a3b8;
    cursor: help;
    transition: border-color 0.15s;
}
.glossary-term:hover { border-color: #3B82F6; color: #3B82F6; }

.tooltip {
    position: fixed;
    max-width: 340px;
    padding: 0.75rem 1rem;
    background: #1e293b;
    color: #f1f5f9;
    border-radius: 8px;
    font-size: 0.8rem;
    line-height: 1.6;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.tooltip.visible { opacity: 1; }
.tooltip__title {
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #93c5fd;
}

/* ========== Table ========== */
.table-actions {
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.table-actions__hint {
    font-size: 0.8rem;
    color: #94a3b8;
}

.btn {
    padding: 0.45rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.82rem;
    font-family: inherit;
    transition: all 0.15s;
}
.btn--export { background: #3B82F6; color: white; }
.btn--export:hover { background: #2563eb; }

.table-wrapper {
    overflow-x: auto;
    padding: 0 1rem 2rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.data-table th {
    background: #f1f5f9;
    padding: 0.7rem 0.6rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
    position: sticky;
    top: 0;
}

.data-table td {
    padding: 0.55rem 0.6rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}

.data-table tbody tr { transition: background 0.1s; }
.data-table tbody tr:hover { background: #f8fafc; }

.data-table .col-highlight { width: 50px; text-align: center; }
.data-table .col-category { width: 60px; }
.data-table .col-date { width: 100px; white-space: nowrap; }
.data-table .col-title { min-width: 200px; }
.data-table .col-location { width: 120px; }
.data-table .col-wealth { width: 140px; white-space: nowrap; }
.data-table .col-notes { min-width: 180px; }

.data-table input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #3B82F6;
}

.notes-input {
    width: 100%;
    min-width: 160px;
    padding: 0.3rem 0.4rem;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: inherit;
    background: transparent;
    resize: vertical;
    transition: border-color 0.15s, background 0.15s;
}
.notes-input:hover { background: #f1f5f9; }
.notes-input:focus {
    outline: none;
    border-color: #3B82F6;
    background: white;
}

.category-badge {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 10px;
    font-size: 0.72rem;
    color: white;
    white-space: nowrap;
}

.wealth-cell { font-size: 0.78rem; font-weight: 500; }
.wealth-cell.wealth--networth { color: #0369a1; }
.wealth-cell.wealth--income { color: #059669; }
.wealth-cell.wealth--expense { color: #b45309; }
.wealth-cell.wealth--loss { color: #dc2626; }

/* ========== Empty State ========== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #94a3b8;
    font-size: 0.95rem;
}

/* ========== Home ========== */
.home {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}

.home__hero {
    text-align: center;
    margin-bottom: 2.5rem;
}

.home__title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.home__subtitle {
    font-size: 1.05rem;
    color: #64748b;
    margin-bottom: 1.25rem;
}

.home__intro {
    font-size: 0.92rem;
    line-height: 1.8;
    color: #475569;
    max-width: 520px;
    margin: 0 auto;
}

.home__stats {
    margin-bottom: 2rem;
}

.home__stats-header {
    text-align: center;
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.home__stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.stat-card {
    text-align: center;
    padding: 1.25rem 0.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.stat-card__number {
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
}
.stat-card__number--green { color: #10B981; }
.stat-card__number--correct { color: #15803d; }
.stat-card__number--wrong { color: #dc2626; }

.stat-card__label {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

.home__features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.feature-card {
    background: white;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.feature-card__title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.feature-card__desc {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.6;
}

.home__highlight {
    margin-bottom: 2.5rem;
}

.home__highlight-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
}

.home__highlight-items {
    display: grid;
    gap: 0.6rem;
}

.highlight-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    font-size: 0.85rem;
}

.highlight-row__badge {
    font-size: 0.72rem;
    padding: 0.15rem 0.55rem;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.highlight-row__text {
    flex: 1;
    min-width: 0;
    color: #475569;
}

.home__cta {
    text-align: center;
    margin-bottom: 2rem;
}

.home__cta-btn {
    padding: 0.75rem 2rem;
    background: #1e293b;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.home__cta-btn:hover {
    background: #334155;
    transform: translateY(-1px);
}

.home__footer {
    text-align: center;
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.8;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .header { flex-direction: column; gap: 0.75rem; align-items: flex-start; }
    .toolbar { flex-direction: column; gap: 0.75rem; align-items: flex-start; }
    .timeline::before { left: 20px; }
    .timeline-item__date { width: 0; padding: 0; position: absolute; top: -1.2rem; left: 40px; font-size: 0.75rem; text-align: left; }
    .timeline-item__dot { left: 15px; }
    .timeline-item__content { margin-left: 42px; }
    .timeline-item { margin-top: 1.5rem; }
    .timeline-year { padding-left: 50px; font-size: 1.2rem; }
    .timeline { padding: 1.5rem 1rem 3rem; }
    .home__stats-grid { grid-template-columns: repeat(2, 1fr); }
    .home__features { grid-template-columns: 1fr; }
    .home__title { font-size: 1.8rem; }
    .home { padding: 2rem 1rem 3rem; }
}
