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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
    background: #07080a;
    color: #d0d0d0;
    min-height: 100vh;
    line-height: 1.6;
}

.container { max-width: 960px; margin: 0 auto; padding: 32px 20px; }

/* Nav */
nav { border-bottom: 1px solid #111; padding: 12px 0; }
.nav-inner { max-width: 960px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; }
.nav-logo { font-size: 1.2rem; font-weight: 800; color: #fff; text-decoration: none; letter-spacing: 1px; }
.nav-logo span { color: #4a9eff; }
.nav-links { display: flex; align-items: center; gap: 12px; }
.nav-link { color: #555; text-decoration: none; font-size: 0.85rem; transition: color 0.15s; }
.nav-link:hover, .nav-link.active { color: #ccc; }
.nav-btn { padding: 5px 14px; font-size: 0.8rem; border: 1px solid #222; border-radius: 5px; background: transparent; color: #888; cursor: pointer; }
.nav-btn:hover { border-color: #444; color: #ccc; }
.nav-btn.primary { background: linear-gradient(135deg, #4a9eff, #7c4dff); color: #fff; border: none; }
.nav-user { color: #555; font-size: 0.8rem; }
.admin-badge {
    display: inline-block; padding: 2px 8px; font-size: 0.65rem; font-weight: 700;
    letter-spacing: 1px; border-radius: 4px; background: linear-gradient(135deg, #f5c542, #e040fb);
    color: #000; margin-right: 6px; vertical-align: middle;
}
.lang-toggle {
    padding: 4px 10px; font-size: 0.75rem; font-weight: 600;
    border: 1px solid #222; border-radius: 4px; background: transparent;
    color: #888; cursor: pointer; transition: all 0.15s; letter-spacing: 0.5px;
}
.lang-toggle:hover { border-color: #444; color: #ccc; }

/* Hero */
.hero { text-align: center; padding: 48px 0 36px; }
.hero-badge { display: inline-block; padding: 4px 14px; font-size: 0.7rem; font-weight: 700; letter-spacing: 2px; border-radius: 20px; background: #0c1524; color: #4a9eff; border: 1px solid #1a2a3a; margin-bottom: 16px; }
.hero h1 { font-size: 2.2rem; font-weight: 700; color: #fff; line-height: 1.3; max-width: 680px; margin: 0 auto 16px; }
.hero-sub { color: #666; font-size: 1.05rem; max-width: 560px; margin: 0 auto; line-height: 1.7; }

/* Features */
.features { padding: 48px 0; border-top: 1px solid #111; }
.section-title { text-align: center; font-size: 1.4rem; color: #fff; margin-bottom: 8px; }
.section-sub { text-align: center; color: #555; font-size: 0.95rem; margin-bottom: 32px; }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.feature-card { padding: 24px; border: 1px solid #141414; border-radius: 10px; background: #0a0b0e; }
.feature-icon { font-size: 1.6rem; margin-bottom: 10px; }
.feature-card h3 { font-size: 1rem; color: #fff; margin-bottom: 6px; }
.feature-card p { font-size: 0.85rem; color: #888; line-height: 1.6; }

/* Hero CTA */
.hero-cta { margin-top: 24px; }
.cta-btn {
    padding: 14px 36px; font-size: 1rem; font-weight: 600; border: none; border-radius: 8px;
    background: linear-gradient(135deg, #4a9eff, #7c4dff); color: #fff; cursor: pointer;
    transition: opacity 0.2s; letter-spacing: 0.5px;
}
.cta-btn:hover { opacity: 0.9; }

/* Briefing Archive */
.briefing-archive { margin-top: 16px; }
.archive-date-group { margin-bottom: 24px; }
.archive-date { color: #fff; font-size: 1rem; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid #141414; }
.archive-items { display: flex; flex-direction: column; gap: 6px; }
.archive-item {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px;
    border: 1px solid #141414; border-radius: 8px; background: #0a0b0e;
    text-decoration: none; transition: all 0.15s; cursor: pointer;
}
.archive-item:hover { border-color: #4a9eff; transform: translateX(4px); }
.archive-time { color: #4a9eff; font-size: 0.8rem; font-weight: 600; min-width: 45px; }
.archive-title { color: #ccc; font-size: 0.9rem; flex: 1; }
.archive-lang { font-size: 0.65rem; padding: 2px 6px; background: #1a1a2a; color: #888; border-radius: 3px; }

/* Reports Library */
.reports-library { padding: 48px 0; border-top: 1px solid #111; }
.reports-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 24px; }
.report-card {
    padding: 16px; border: 1px solid #141414; border-radius: 8px; background: #0a0b0e;
    cursor: pointer; transition: all 0.15s;
}
.report-card:hover { border-color: #4a9eff; transform: translateY(-2px); }
.rc-skill { font-size: 0.7rem; color: #888; margin-bottom: 6px; }
.rc-title { font-size: 0.95rem; color: #ddd; font-weight: 600; margin-bottom: 8px; line-height: 1.3; }
.rc-date { font-size: 0.75rem; color: #444; }
.lib-empty { text-align: center; color: #444; padding: 32px; grid-column: 1/-1; }
.cache-badge {
    display: inline-block; padding: 1px 8px; font-size: 0.65rem; font-weight: 600;
    background: #26a69a20; color: #26a69a; border-radius: 3px; letter-spacing: 0.5px;
}

/* FAQ */
.faq { padding: 48px 0; border-top: 1px solid #111; }
.faq-list { max-width: 700px; margin: 24px auto 0; }
.faq-item { border: 1px solid #141414; border-radius: 8px; margin-bottom: 8px; background: #0a0b0e; }
.faq-item summary {
    padding: 14px 18px; font-size: 0.95rem; color: #ddd; cursor: pointer; font-weight: 500;
    list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: '+ '; color: #4a9eff; font-weight: 700; }
.faq-item[open] summary::before { content: '− '; }
.faq-item p { padding: 0 18px 14px; font-size: 0.88rem; color: #888; line-height: 1.7; }

/* Site footer */
.site-footer { text-align: center; padding: 32px 20px; border-top: 1px solid #111; margin-top: 40px; }
.footer-inner p { margin-bottom: 6px; }
.footer-inner strong { color: #fff; }
.site-footer p { color: #444; font-size: 0.8rem; }
.footer-links a { color: #555; text-decoration: none; font-size: 0.8rem; }
.footer-links a:hover { color: #4a9eff; }
.footer-legal { color: #333; font-size: 0.7rem; margin-top: 8px; }

/* Tabs */
.skill-tabs { display: flex; justify-content: center; gap: 6px; margin-bottom: 20px; }
.tab {
    padding: 9px 22px; font-size: 0.9rem; font-weight: 500;
    border: 1px solid #1a1a1a; border-radius: 6px; background: #0d0e12;
    color: #666; cursor: pointer; transition: all 0.15s;
}
.tab:hover { border-color: #333; color: #aaa; }
.tab.active { border-color: #4a9eff; color: #4a9eff; background: #0c1524; }

/* Panels */
.skill-panel { display: none; margin-bottom: 24px; }
.skill-panel.active { display: block; }
.skill-panel form { display: flex; gap: 10px; max-width: 640px; margin: 0 auto; }
.skill-panel input {
    flex: 1; padding: 13px 18px; font-size: 1rem;
    border: 1px solid #1a1a1a; border-radius: 8px;
    background: #0d0e12; color: #fff; outline: none; transition: border-color 0.2s;
}
.skill-panel input:focus { border-color: #4a9eff; }
.skill-panel input::placeholder { color: #444; }
.skill-panel button {
    padding: 13px 26px; font-size: 0.95rem; font-weight: 600;
    border: none; border-radius: 8px;
    background: linear-gradient(135deg, #4a9eff, #7c4dff); color: #fff;
    cursor: pointer; transition: opacity 0.2s; white-space: nowrap;
}
.skill-panel button:hover { opacity: 0.9; }
.skill-panel button:disabled { opacity: 0.3; cursor: not-allowed; }
.briefing-hero { text-align: center; padding: 12px 0; max-width: 500px; margin: 0 auto; }
.briefing-desc { color: #666; font-size: 0.9rem; margin-bottom: 16px; line-height: 1.6; }

/* Auth */
.auth-bar { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-bottom: 16px; }
.auth-btn {
    padding: 6px 16px; font-size: 0.82rem; border: 1px solid #222; border-radius: 5px;
    background: transparent; color: #888; cursor: pointer; transition: all 0.15s;
}
.auth-btn:hover { border-color: #444; color: #ccc; }
.auth-btn.primary { background: linear-gradient(135deg, #4a9eff, #7c4dff); color: #fff; border: none; }
.user-email { color: #666; font-size: 0.82rem; }
.tier-badge {
    padding: 2px 8px; font-size: 0.7rem; font-weight: 700; letter-spacing: 1px;
    border-radius: 3px; background: #1a1a1a; color: #666;
}
.tier-badge.pro { background: linear-gradient(135deg, #4a9eff, #7c4dff); color: #fff; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal-content {
    background: #0d0e12; border: 1px solid #1a1a1a; border-radius: 12px;
    padding: 32px; width: 360px; position: relative;
}
.modal-close { position: absolute; top: 12px; right: 16px; background: none; border: none; color: #666; font-size: 1.4rem; cursor: pointer; }
.modal-content h3 { color: #fff; margin-bottom: 20px; font-size: 1.2rem; }
.modal-content input {
    width: 100%; padding: 11px 14px; margin-bottom: 10px; font-size: 0.95rem;
    border: 1px solid #1a1a1a; border-radius: 6px; background: #07080a; color: #fff; outline: none;
}
.modal-content input:focus { border-color: #4a9eff; }
.modal-content button[type="submit"] {
    width: 100%; padding: 11px; margin-top: 6px; font-size: 0.95rem; font-weight: 600;
    border: none; border-radius: 6px; background: linear-gradient(135deg, #4a9eff, #7c4dff);
    color: #fff; cursor: pointer;
}
.auth-error { color: #ef5350; font-size: 0.85rem; margin-top: 8px; text-align: center; }

/* Pricing */
.pricing { padding: 48px 0; border-top: 1px solid #111; }
.pricing-cards { display: flex; gap: 16px; justify-content: center; }
.pricing-card { flex: 1; max-width: 280px; padding: 24px; border: 1px solid #141414; border-radius: 10px; background: #0a0b0e; }
.pricing-card.highlight { border-color: #4a9eff; }
.pricing-tier { color: #888; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 6px; }
.pricing-price { font-size: 2rem; font-weight: 700; color: #fff; margin-bottom: 10px; }
.pricing-price span { font-size: 0.85rem; color: #555; font-weight: 400; }
.pricing-desc { font-size: 0.85rem; color: #666; line-height: 1.6; }

.free-tag { font-size: 0.6rem; padding: 1px 5px; background: #26a69a20; color: #26a69a; border-radius: 3px; margin-left: 4px; }
.price-tag { font-size: 0.6rem; padding: 1px 5px; background: #4a9eff20; color: #4a9eff; border-radius: 3px; margin-left: 4px; }

/* Feedback page */
.feedback-form-card { padding: 24px; border: 1px solid #141414; border-radius: 10px; background: #0a0b0e; margin-bottom: 24px; }
.feedback-form-card h3 { color: #fff; margin-bottom: 16px; }
.feedback-form-card select, .feedback-form-card input, .feedback-form-card textarea {
    width: 100%; padding: 10px 14px; margin-bottom: 10px; font-size: 0.9rem;
    border: 1px solid #1a1a1a; border-radius: 6px; background: #07080a; color: #fff;
    outline: none; font-family: inherit; resize: vertical;
}
.feedback-form-card select { color: #888; }
.feedback-form-card button {
    padding: 10px 24px; border: none; border-radius: 6px;
    background: linear-gradient(135deg, #4a9eff, #7c4dff); color: #fff;
    font-weight: 600; cursor: pointer;
}
.fb-success { color: #26a69a; font-size: 0.85rem; margin-top: 8px; }
.feedback-list h3 { color: #fff; margin-bottom: 16px; }
.fb-count { color: #555; font-weight: 400; font-size: 0.85rem; }
.fb-item { padding: 16px; border: 1px solid #141414; border-radius: 8px; margin-bottom: 10px; background: #0a0b0e; }
.fb-item-header { display: flex; justify-content: space-between; margin-bottom: 6px; }
.fb-cat { font-size: 0.7rem; padding: 2px 8px; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.fb-cat-feature { background: #4a9eff20; color: #4a9eff; }
.fb-cat-custom_skill { background: #7c4dff20; color: #7c4dff; }
.fb-cat-bug { background: #ef535020; color: #ef5350; }
.fb-cat-general { background: #66666620; color: #888; }
.fb-status { font-size: 0.7rem; padding: 2px 8px; border-radius: 3px; font-weight: 600; }
.fb-status-open { background: #f5c54220; color: #f5c542; }
.fb-status-reviewed { background: #4a9eff20; color: #4a9eff; }
.fb-status-planned { background: #26a69a20; color: #26a69a; }
.fb-status-done { background: #26a69a40; color: #26a69a; }
.fb-status-wontfix { background: #66666620; color: #888; }
.fb-item h4 { color: #ddd; font-size: 0.95rem; margin-bottom: 4px; }
.fb-item p { color: #888; font-size: 0.85rem; }
.fb-triage { margin-top: 8px; padding: 8px 12px; background: #0c1524; border-radius: 6px; font-size: 0.82rem; color: #999; border-left: 2px solid #4a9eff; }
.fb-meta { color: #444; font-size: 0.75rem; margin-top: 8px; }
.fb-empty { color: #444; text-align: center; padding: 32px; }

/* Loading */
.loading { text-align: center; padding: 50px 0; }
.loading-text { color: #666; margin-top: 18px; font-size: 0.95rem; }
.spinner {
    width: 36px; height: 36px;
    border: 2.5px solid #1a1a1a; border-top-color: #4a9eff;
    border-radius: 50%; animation: spin 0.7s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-sources { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.source-tag {
    padding: 4px 12px; font-size: 0.75rem; font-weight: 500;
    border: 1px solid #1a1a1a; border-radius: 4px; color: #444;
    transition: all 0.3s;
}
.source-tag.active { border-color: #4a9eff; color: #4a9eff; background: #0c1524; }

.error {
    text-align: center; color: #ef5350; padding: 16px;
    background: #1a0a0a; border: 1px solid #2a1010; border-radius: 8px; margin-bottom: 16px;
}
.hidden { display: none !important; }

/* Chart */
.chart-container {
    background: #0a0a0a; border: 1px solid #141414;
    border-radius: 10px; padding: 12px 8px; margin-bottom: 24px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

/* Report */
.report-section { margin-top: 8px; }
.report-header {
    border-bottom: 1px solid #1a1a1a; padding-bottom: 16px; margin-bottom: 28px;
    position: relative;
}
.report-badge {
    display: inline-block; padding: 3px 10px; font-size: 0.7rem; font-weight: 700;
    letter-spacing: 2px; border-radius: 3px; margin-bottom: 8px;
    background: linear-gradient(135deg, #4a9eff, #7c4dff); color: #fff;
}
.report-header h2 { font-size: 1.6rem; color: #fff; margin-bottom: 8px; font-weight: 700; }
.report-meta { display: flex; flex-wrap: wrap; gap: 16px; color: #555; font-size: 0.85rem; }
.report-meta strong { color: #4a9eff; }

.report-content { line-height: 1.8; font-size: 0.95rem; }
.report-content h1 { font-size: 1.4rem; color: #fff; margin: 32px 0 14px; font-weight: 700; }
.report-content h2 {
    font-size: 1.15rem; color: #fff; margin: 28px 0 12px; font-weight: 600;
    padding-bottom: 8px; border-bottom: 1px solid #141414;
}
.report-content h3 { font-size: 1.05rem; color: #ccc; margin: 20px 0 8px; font-weight: 600; }
.report-content h4 { font-size: 0.95rem; color: #aaa; margin: 16px 0 6px; }
.report-content p { margin-bottom: 12px; color: #bbb; }
.report-content ul, .report-content ol { margin: 10px 0; padding-left: 22px; }
.report-content li { margin-bottom: 5px; color: #bbb; }
.report-content strong { color: #e0e0e0; }
.report-content em { color: #999; }
.report-content a { color: #4a9eff; text-decoration: none; }
.report-content a:hover { text-decoration: underline; }

/* Tables */
.report-content table {
    width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 0.88rem;
    border: 1px solid #141414; border-radius: 6px; overflow: hidden;
}
.report-content th {
    background: #0f1118; color: #4a9eff; text-align: left;
    padding: 9px 12px; font-weight: 600; font-size: 0.82rem;
    text-transform: uppercase; letter-spacing: 0.5px;
    border-bottom: 2px solid #1a1a2a;
}
.report-content td {
    padding: 8px 12px; border-bottom: 1px solid #0f0f12; color: #bbb;
}
.report-content tr:hover td { background: #0c0d10; }
.report-content tr:last-child td { border-bottom: none; }

/* Code */
.report-content code {
    background: #0f1118; padding: 2px 6px; border-radius: 3px;
    font-size: 0.85em; color: #7c4dff; font-family: 'SF Mono', 'Fira Code', monospace;
}
.report-content blockquote {
    border-left: 3px solid #4a9eff; padding: 10px 16px; margin: 14px 0;
    background: #0c1524; border-radius: 0 6px 6px 0; color: #999;
}
.report-content hr {
    border: none; border-top: 1px solid #141414; margin: 24px 0;
}

/* Interactive links */
.ticker-link {
    color: #4a9eff; cursor: pointer;
    border-bottom: 1px dashed rgba(74,158,255,0.3);
    transition: all 0.15s; padding: 0 1px; border-radius: 2px;
}
.ticker-link:hover { background: rgba(74,158,255,0.12); border-bottom-color: #4a9eff; }

/* Footer */
.report-footer {
    margin-top: 32px; padding-top: 16px; border-top: 1px solid #141414;
    text-align: center;
}
.report-footer p { color: #333; font-size: 0.75rem; letter-spacing: 0.5px; }

/* Personal Briefing / Portfolio Management */
.personal-panel { max-width: 640px; margin: 0 auto; }
.personal-login-prompt {
    text-align: center; color: #666; padding: 32px; font-size: 0.95rem;
    border: 1px dashed #222; border-radius: 10px; background: #0a0b0e;
}
.personal-login-prompt a { color: #4a9eff; cursor: pointer; text-decoration: underline; }

.portfolio-section {
    margin-bottom: 20px; padding: 20px; border: 1px solid #141414;
    border-radius: 10px; background: #0a0b0e;
}
.portfolio-section h4 {
    color: #fff; font-size: 0.95rem; margin-bottom: 12px; font-weight: 600;
}

/* Watchlist input */
.watchlist-input {
    width: 100%; padding: 11px 14px; font-size: 0.9rem;
    border: 1px solid #1a1a1a; border-radius: 6px; background: #07080a;
    color: #fff; outline: none; font-family: inherit;
}
.watchlist-input:focus { border-color: #4a9eff; }
.watchlist-input::placeholder { color: #444; }

/* Portfolio table */
.portfolio-table {
    width: 100%; border-collapse: collapse; margin-bottom: 12px;
}
.portfolio-table th {
    text-align: left; padding: 8px 10px; font-size: 0.75rem;
    color: #4a9eff; text-transform: uppercase; letter-spacing: 0.5px;
    font-weight: 600; border-bottom: 1px solid #1a1a1a;
}
.portfolio-table td { padding: 6px 4px; }
.portfolio-table input {
    width: 100%; padding: 8px 10px; font-size: 0.85rem;
    border: 1px solid #1a1a1a; border-radius: 5px; background: #07080a;
    color: #fff; outline: none;
}
.portfolio-table input:focus { border-color: #4a9eff; }
.portfolio-table input::placeholder { color: #333; }
.portfolio-table .col-ticker { width: 35%; }
.portfolio-table .col-shares { width: 25%; }
.portfolio-table .col-cost { width: 25%; }
.portfolio-table .col-action { width: 15%; text-align: center; }

.btn-remove-row {
    padding: 4px 10px; font-size: 0.8rem; border: 1px solid #331a1a;
    border-radius: 4px; background: transparent; color: #ef5350;
    cursor: pointer; transition: all 0.15s;
}
.btn-remove-row:hover { background: #1a0a0a; border-color: #ef5350; }

.btn-add-row {
    padding: 6px 14px; font-size: 0.82rem; border: 1px solid #1a2a1a;
    border-radius: 5px; background: transparent; color: #26a69a;
    cursor: pointer; transition: all 0.15s; margin-bottom: 12px;
}
.btn-add-row:hover { background: #0a1a0a; border-color: #26a69a; }

.portfolio-actions {
    display: flex; gap: 10px; align-items: center; margin-top: 16px;
}
.btn-save-portfolio {
    padding: 10px 24px; font-size: 0.9rem; font-weight: 600;
    border: none; border-radius: 6px;
    background: linear-gradient(135deg, #26a69a, #2196f3); color: #fff;
    cursor: pointer; transition: opacity 0.2s;
}
.btn-save-portfolio:hover { opacity: 0.9; }
.btn-save-portfolio:disabled { opacity: 0.3; cursor: not-allowed; }
.portfolio-msg { font-size: 0.85rem; color: #26a69a; }
.portfolio-msg.error { color: #ef5350; }

.personal-generate {
    text-align: center; margin-top: 20px;
}
.pro-price-tag {
    font-size: 0.6rem; padding: 1px 5px; background: #7c4dff20;
    color: #7c4dff; border-radius: 3px; margin-left: 4px; font-weight: 600;
}

/* Portfolio summary (when portfolio exists) */
.portfolio-summary {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px;
}
.portfolio-summary-item {
    padding: 10px 14px; background: #07080a; border: 1px solid #141414;
    border-radius: 6px;
}
.portfolio-summary-item .label { font-size: 0.72rem; color: #555; text-transform: uppercase; letter-spacing: 0.5px; }
.portfolio-summary-item .value { font-size: 1.1rem; color: #fff; font-weight: 600; margin-top: 2px; }

/* Responsive */
@media (max-width: 600px) {
    .skill-panel form { flex-direction: column; }
    .skill-tabs { flex-wrap: wrap; }
    .report-meta { flex-direction: column; gap: 6px; }
    header h1 { font-size: 1.4rem; }
    .container { padding: 20px 14px; }
    .portfolio-summary { grid-template-columns: 1fr; }
    .portfolio-table .col-action { width: 20%; }
}
