/* ==========================================================================
   Kaya Morning Briefing Dashboard
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1d1d1f;
    background-color: #fafaf9;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

/* ---- Header ---- */
.site-header {
    background: white;
    padding: 24px 0;
    border-bottom: 1px solid #e5e5e7;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logos {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header-logo {
    height: 28px;
    width: auto;
    object-fit: contain;
}

.header-title { text-align: right; }

.header-link {
    text-decoration: none;
    color: inherit;
}

.site-header h1 {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.2px;
    color: #1a3a5c;
    margin: 0;
}

.header-subtitle {
    font-size: 12px;
    font-weight: 400;
    color: #86868b;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    margin-top: 2px;
}

/* ---- Footer ---- */
.site-footer {
    margin-top: 80px;
    padding: 24px 0;
    border-top: 1px solid #e5e5e7;
    font-size: 12px;
    color: #86868b;
    text-align: center;
    letter-spacing: 0.2px;
}

/* ---- Main ---- */
main { padding: 40px 32px; }

.page-heading {
    font-size: 28px;
    font-weight: 700;
    color: #1d1d1f;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.page-subheading {
    font-size: 14px;
    color: #86868b;
    margin-bottom: 32px;
}

/* ---- Briefing list ---- */
.briefing-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.briefing-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 20px 24px;
    border-radius: 10px;
    border: 1px solid #e5e5e7;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.briefing-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.briefing-card-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.briefing-date {
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
}

.briefing-meta {
    font-size: 13px;
    color: #86868b;
}

.article-count-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    background-color: #f0f0f2;
    color: #555;
    letter-spacing: 0.2px;
}

.legacy-badge {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
    background-color: #fef3e2;
    color: #a67c37;
    vertical-align: middle;
}

.card-arrow {
    color: #c7c7cc;
    font-size: 18px;
    transition: color 0.15s;
}

.briefing-card:hover .card-arrow {
    color: #1a3a5c;
}

/* ---- Briefing detail ---- */
.back-link {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    color: #86868b;
    text-decoration: none;
    margin-bottom: 20px;
    transition: color 0.15s;
}

.back-link:hover { color: #1d1d1f; }

.briefing-header {
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e5e7;
}

.briefing-header h2 {
    font-size: 26px;
    font-weight: 700;
    color: #1d1d1f;
    letter-spacing: -0.4px;
    margin-bottom: 8px;
}

/* ---- Section headings ---- */
.section-heading {
    font-size: 12px;
    font-weight: 700;
    color: #1a3a5c;
    margin: 40px 0 16px 0;
    padding-left: 12px;
    border-left: 3px solid #1a3a5c;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* ---- Articles ---- */
.article {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    background: white;
    margin-bottom: 10px;
    padding: 20px 24px;
    border-radius: 10px;
    border: 1px solid #e5e5e7;
    transition: box-shadow 0.15s ease;
}

.article:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.article-content {
    flex: 1;
    min-width: 0;
}

.article-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
    margin: 0 0 6px 0;
}

.article-title a {
    color: #1a3a5c;
    text-decoration: none;
    transition: color 0.15s;
}

.article-title a:hover { color: #2d5f8a; }

.article-source {
    font-size: 11px;
    color: #86868b;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 8px;
    font-weight: 500;
}

.article-summary {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    margin: 0;
}

.article-summary em {
    color: #86868b;
    font-size: 12px;
}

.no-updates {
    color: #86868b;
    font-size: 14px;
    font-style: italic;
    padding: 8px 0;
}

/* ---- Feedback buttons ---- */
.feedback-buttons {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
    padding-top: 2px;
}

.btn-feedback {
    width: 34px;
    height: 30px;
    border: 1.5px solid #e5e5e7;
    border-radius: 8px;
    background: #fafafa;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
}

.article:hover .btn-feedback { opacity: 1; }

.btn-feedback:hover {
    border-color: #999;
    background: white;
}

.btn-up.active {
    background-color: #e6f9ed;
    border-color: #22763d;
    opacity: 1;
}

.btn-down.active {
    background-color: #fde8e8;
    border-color: #c53030;
    opacity: 1;
}

/* ---- Market Snapshot ---- */
.market-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.market-card {
    background: white;
    padding: 20px 24px;
    border-radius: 10px;
    border: 1px solid #e5e5e7;
}

.market-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 12px;
}

.market-name {
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
}

.market-value {
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
}

.market-change {
    font-size: 13px;
    font-weight: 500;
}

.market-change.up { color: #2d6a4f; }
.market-change.down { color: #c1121f; }

.market-chart {
    width: 100%;
    max-width: 560px;
    height: auto;
    border-radius: 4px;
}

/* ---- Legacy content ---- */
.legacy-content {
    background: white;
    padding: 36px;
    border-radius: 10px;
    border: 1px solid #e5e5e7;
}

/* ---- Login ---- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fafafa;
}

.login-card {
    background: white;
    padding: 48px 40px;
    border-radius: 16px;
    border: 1px solid #e5e5e7;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    width: 100%;
    max-width: 380px;
    text-align: center;
}

.login-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
}

.login-logo-kaya-solo {
    height: 28px;
    width: auto;
}

.login-title {
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 4px;
}

.login-subtitle {
    font-size: 13px;
    color: #86868b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 32px;
}

.login-error {
    font-size: 13px;
    color: #c53030;
    background: #fde8e8;
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.login-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e5e5e7;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
    margin-bottom: 12px;
}

.login-input:focus {
    border-color: #1a3a5c;
}

.login-button {
    width: 100%;
    padding: 12px;
    background: #1d1d1f;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
}

.login-button:hover {
    background: #333;
}

/* ---- Navigation ---- */
.header-nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    font-size: 13px;
    font-weight: 500;
    color: #86868b;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 8px;
    transition: all 0.15s;
}

.nav-link:hover {
    color: #1d1d1f;
    background: #f0f0f2;
}

/* ---- Search ---- */
.search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 32px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 1.5px solid #e5e5e7;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
}

.search-input:focus {
    border-color: #1a3a5c;
}

.search-button {
    padding: 12px 24px;
    background: #1d1d1f;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
}

.search-button:hover {
    background: #333;
}

.search-results-count {
    font-size: 13px;
    color: #86868b;
    margin-bottom: 16px;
}

.search-result {
    margin-bottom: 10px;
}

.search-score {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    background-color: #e8f4f0;
    color: #2d6a4f;
    margin-left: 6px;
}

.search-briefing-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #1a3a5c;
    text-decoration: none;
    transition: color 0.15s;
}

.search-briefing-link:hover {
    color: #2d5f8a;
}

.search-error {
    font-size: 13px;
    color: #c53030;
    background: #fde8e8;
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}
