/** main.css — Global styles for home, playground, sidebar, tabs, JSON tree, example code, docs, and narrative components. */

/* ── Auth Layout ─────────────────────────────────────────────────────── */
body.auth-page {
    padding: 0;
    margin: 0;
    background: #fff;
    overflow: hidden;
    height: 100vh;
}

.auth-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Left panel */
.auth-left {
    width: 50%;
    background-color: #1a1fff;
    background-image: url('/static/assets/signin_background.webp');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    flex-direction: column;
}

.auth-left-inner {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 40px 48px;
    background: rgba(0, 10, 180, 0.15);
}

.auth-brand {
    display: flex;
    align-items: center;
}

.auth-headline {
    font-size: 42px;
    font-weight: 400;
    color: #fff;
    line-height: 1.2;
    margin-top: 48px;
    letter-spacing: -0.5px;
}

.auth-left-bottom {
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    line-height: 1.8;
}
.auth-left-bottom a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}
.auth-left-bottom a:hover {
    color: #fff;
}

/* Right panel */
.auth-right {
    width: 50%;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-form-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.auth-form-view {
    width: 100%;
    max-width: 340px;
}

.auth-form-title {
    font-size: 20px;
    font-weight: 500;
    color: #111;
    text-align: center;
    line-height: 1.5;
    margin-bottom: 36px;
}

.auth-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    color: #111;
    outline: none;
    transition: border-color 0.15s;
    background: #fff;
}

.auth-input:focus {
    border-color: #001AFF;
}

.auth-input::placeholder {
    color: #aaa;
}

.auth-name-row {
    display: flex;
    gap: 12px;
}

.auth-name-row .auth-input {
    flex: 1;
}

.auth-password-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-password-wrapper {
    position: relative;
}

.auth-password-wrapper .auth-input,
.auth-password-wrapper .form-input {
    padding-right: 44px;
}

.auth-eye-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #aaa;
    display: flex;
    align-items: center;
    line-height: 1;
}

.auth-eye-btn:hover {
    color: #555;
}

.auth-forgot {
    font-size: 13px;
    color: #555;
    text-decoration: none;
}

.auth-forgot:hover {
    color: #001AFF;
}

.auth-btn {
    width: 100%;
    height: 52px;
    background: #001AFF;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.15s;
}

.auth-btn:hover {
    background: #0015cc;
}

.auth-switch {
    text-align: center;
    font-size: 14px;
    color: #555;
}

.auth-switch a {
    color: #001AFF;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1.5px solid #001AFF;
}

.auth-result {
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 6px;
    text-align: center;
}

.auth-result.error { background: #fff0f0; color: #c0392b; }
.auth-result.success { background: #f0fff4; color: #27ae60; }
.auth-result.loading { background: #f5f5f5; color: #555; }

.auth-footer {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 24px;
    border-top: 1px solid #f0f0f0;
}

.auth-footer a {
    font-size: 13px;
    color: #888;
    text-decoration: none;
}

.auth-footer a:hover {
    color: #001AFF;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #fafafa;
    padding: 20px;
}

body:has(.app-layout) {
    padding: 0;
    overflow: hidden;
}

/* ── App Layout (sidebar + main) ─────────────────────────────────────── */
.app-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.app-layout body,
body:has(.app-layout) {
    padding: 0;
}

.app-layout ~ * { padding: 0; }

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px 36px;
    min-width: 0;
    background: white;
}

/* ── Sidebar ─────────────────────────────────────────────────────────── */
.sidebar {
    width: 220px;
    min-width: 220px;
    background: #F3F5F7;
    border-right: 1px solid #E6E9EF;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 0;
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 16px 16px;
    border-bottom: none;
}

.sidebar-logo {
    width: 150px;
    height: auto;
}

.sidebar-brand-name {
    font-size: 15px;
    font-weight: 600;
    color: #111;
    letter-spacing: -0.2px;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.nav-item:hover {
    background: #E6E9EF;
    color: #111;
}

.nav-item.active {
    background: #E6E9EF;
    color: #111;
    font-weight: 600;
}

.nav-icon-img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.6;
}

.nav-item.active .nav-icon-img {
    opacity: 1;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 14px 18px;
    border-top: 1px solid #f0f0f0;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 26, 255, 0.15);
    color: #001AFF;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 13px;
    font-weight: 500;
    color: #1C1C1E;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-plan {
    font-size: 11px;
    color: #6E6E73;
    margin-top: 1px;
}

.logout-btn {
    background: none;
    border: none;
    color: #6E6E73;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    border-radius: 4px;
    flex-shrink: 0;
    transition: color 0.15s;
}

.logout-btn:hover {
    color: #F5F5F5;
}

/* ── Page cards (api-key, subscription, docs) ────────────────────────── */
.page-card {
    background: white;
    border-radius: 12px;
    padding: 32px;
    width: 100%;
    border: 1px solid #e8e8e8;
    max-width: 1400px;
}

.page-card h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

/* API Key page */
.api-key-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 14px 16px;
    margin-top: 20px;
}

.api-key-text {
    font-family: monospace;
    font-size: 14px;
    color: #333;
    word-break: break-all;
    flex: 1;
}

.btn-copy-inline {
    background: #001AFF;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 13px;
    cursor: pointer;
    flex-shrink: 0;
}

.info-box {
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 16px;
}

.info-box h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.code-snippet {
    background: #1e1e1e;
    color: #d4d4d4;
    font-family: monospace;
    font-size: 13px;
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    white-space: pre;
}

/* Subscription page */
.current-plan-banner {
    margin: 16px 0 24px;
}

.banner-trial {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    color: #795548;
}

.banner-active {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    color: #2e7d32;
}

.plan-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 8px;
}

.plan-card {
    border: 1px solid #e8e8e8;
    border-radius: 14px;
    padding: 24px;
    position: relative;
}

.plan-card-highlight {
    border-color: #001AFF;
    box-shadow: 0 0 0 1px #001AFF;
}

.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #001AFF;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}

.plan-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.plan-price {
    font-size: 32px;
    font-weight: 700;
    color: #001AFF;
    margin-bottom: 16px;
}

.plan-period {
    font-size: 14px;
    font-weight: 400;
    color: #666;
}

.plan-features {
    list-style: none;
    margin-bottom: 20px;
}

.plan-features li {
    font-size: 14px;
    color: #444;
    padding: 4px 0;
}

.plan-note {
    font-size: 12px;
    color: #888;
    font-style: italic;
}

/* Documentation page */
.docs-page h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 12px;
    color: #1a1a1a;
}

.docs-divider {
    border: none;
    border-top: 1px solid #e8e8e8;
    margin: 28px 0;
}

.endpoint-block {
    margin-bottom: 28px;
}

.endpoint-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.method-badge {
    background: #e3f2fd;
    color: #1565c0;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: monospace;
}

.params-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin: 10px 0;
}

.params-table th {
    text-align: left;
    padding: 7px 10px;
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #e0e0e0;
}

.params-table td {
    padding: 7px 10px;
    border-bottom: 1px solid #f0f0f0;
    color: #444;
}

.forgot-link {
    font-size: 13px;
    color: #001AFF;
    text-decoration: none;
}
.forgot-link:hover { text-decoration: underline; }

/* ── OTP login buttons ────────────────────────────────────────────────── */
.btn-secondary {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 14px;
    cursor: pointer;
    display: block;
    width: 100%;
}

/* Brand strip: one bar, logo left, title + subtitle right */
.brand-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 20px;
    margin-bottom: 20px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
}
.brand-logo {
    height: 26px;
    width: auto;
    display: block;
    flex-shrink: 0;
}
.brand-text {
    text-align: right;
    min-width: 0;
}
.brand-title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: 0.02em;
}
.brand-subtitle {
    margin: 4px 0 0;
    font-size: 13px;
    color: #666;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

h1 {
    color: #1e1e1e;
    margin-bottom: 6px;
    font-size: 28px;
    letter-spacing: 0.2px;
}
.page-subtitle {
    color: #666;
    margin-bottom: 24px;
    font-size: 14px;
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    color: #111;
    margin-bottom: 20px;
    letter-spacing: -0.3px;
}

.controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
    background: #FAFBFC;
    border-radius: 12px;
    padding: 14px 16px;
}

.ctrl-select {
    height: 44px;
    padding: 0 36px 0 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #111;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23555' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 12px center;
    appearance: none;
    cursor: pointer;
    min-width: 120px;
}

.ctrl-select:focus {
    outline: none;
    border-color: #001AFF;
}

.ctrl-load-btn {
    height: 44px;
    padding: 0 24px;
    background: #001AFF;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.ctrl-load-btn:hover {
    background: #0015cc;
}

.controls-hint {
    font-size: 12px;
    color: #888;
    margin-bottom: 24px;
}

/* Legacy controls support (api-key page etc.) */
.controls input.controls-api-key {
    flex: 1 1 auto;
    min-width: 200px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

/* Chart switch buttons — segmented control */
.chart-switch-buttons {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #d5d9e8;
    border-radius: 12px;
    padding: 4px;
    gap: 2px;
}

.switch-btn {
    padding: 7px 18px;
    background: transparent;
    color: #555;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
    font-weight: 500;
}

.switch-btn:hover {
    color: #111;
}

.switch-btn.active {
    background: #E4E7ED;
    color: #111;
    font-weight: 600;
}

/* Price checkbox label */
.price-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    user-select: none;
}

.custom-checkbox {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: #001AFF;
    flex-shrink: 0;
    transition: background 0.15s;
}

.custom-checkbox.unchecked {
    background: transparent;
    border: 1.5px solid #aaa;
}

.custom-checkbox.unchecked img {
    display: none;
}

.price-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #001AFF;
}

.summary {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.summary-card {
    background: #FAFBFC;
    padding: 20px;
    border-radius: 12px;
}

.value-total {
    font-size: 18px;
    font-weight: 400;
    color: #555;
}

.summary-card h3 {
    color: #111;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
}

.summary-card .value {
    font-size: 32px;
    font-weight: bold;
    color: #111;
}

.summary-card-desc {
    font-size: 11px;
    color: #999;
    margin-top: 8px;
    line-height: 1.5;
}

.narratives-section, .events-section {
    background: transparent;
    padding: 0;
    margin-bottom: 20px;
    min-width: 0;
}

.narratives-section h2, .events-section h2 {
    margin-bottom: 12px;
}

.narrative-item, .event-item {
    padding: 16px 20px;
    cursor: pointer;
    scroll-margin-top: 24px;
    transition: background 0.2s;
    min-width: 0;
    border-radius: 12px;
    border: none;
    margin-bottom: 8px;
    background: #FAFBFC;
}

/* Narrative item layout: flex for flexible children */
.narrative-item {
    display: flex;
    flex-direction: column;
}

.narrative-item:hover, .event-item:hover {
    background: #f0f2f5;
}

/* Color bar + title row */
.narrative-title-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 6px;
}

.narrative-color-bar {
    width: 24px;
    height: 3px;
    border-radius: 2px;
    flex-shrink: 0;
    margin-top: 10px;
}

.narrative-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-width: 0;
}

/* Narrative metadata and buttons: wrap on narrow screens */
.narrative-item .event-meta {
    flex-shrink: 0;
}

/* View Chart + Recommended Articles: side by side, vertically aligned */
.narrative-buttons-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 12px;
}

.narrative-buttons-row .view-chart-btn {
    flex-shrink: 0;
    margin-top: 0;
    margin-bottom: 0;
    align-self: center;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
}

.narrative-buttons-row .articles-toggle {
    margin-top: 0;
    margin-bottom: 0;
    align-self: center;
    padding: 6px 12px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
}

.event-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.event-meta {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.articles-toggle {
    margin-top: 16px;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #001AFF;
    display: inline-block;
    width: fit-content;
}

.articles-toggle:hover {
    background: #e9ecef;
}

.articles-list {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    display: none;
    width: 100%;
    text-align: left;
    box-sizing: border-box;
}

.articles-list.show {
    display: block;
}

.article-item {
    padding: 10px;
    margin-bottom: 8px;
    background: white;
    border-left: 3px solid #001AFF;
    border-radius: 12px;
}

.article-item:last-child {
    margin-bottom: 0;
}

.article-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 14px;
}

.article-title a {
    color: #001AFF;
    text-decoration: none;
}

.article-title a:hover {
    text-decoration: underline;
}

.article-meta {
    font-size: 11px;
    color: #666;
    margin-top: 5px;
}

.article-snippet {
    font-size: 12px;
    color: #555;
    margin-top: 5px;
    line-height: 1.4;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.error {
    background: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 18px;
    margin: 10px 0;
}

.sentiment-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}
.sentiment-positive {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}
.sentiment-negative {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}
.sentiment-neutral {
    background: rgba(107, 114, 128, 0.12);
    color: #4b5563;
}

.visualization-section {
    background: transparent;
    padding: 0;
    margin-bottom: 20px;
    overflow-x: auto;
    min-width: 0;
}

/* Same adaptive behaviour for Narrative and Sentiment: header wraps, chart keeps min width */
.chart-header-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 0;
    background: transparent;
    border: none;
}
.chart-header-title {
    min-width: 0;
}
.chart-header-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

.chart-container {
    position: relative;
    height: 400px;
    margin-top: 20px;
    padding-bottom: 40px;
    margin-bottom: 32px;
    min-width: 560px;
    cursor: pointer; /* hand cursor on hover (same as breakdown) */
}

/* Narrative Insights inside same section as chart (one big layout) */
.insights-in-chart {
    border-top: 1px solid #e8e8e8;
    padding-top: 48px;
    margin-top: 0;
}
.insights-in-chart-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px;
    padding: 0;
    letter-spacing: 0.02em;
}

/* Custom chart tooltip: white box, thin visible border, shadow; off-screen until hover to avoid white box at bottom */
.chart-tooltip-custom {
    position: fixed;
    left: -9999px;
    top: 0;
    z-index: 1000;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.18);
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    font-size: 13px;
    line-height: 1.45;
    max-width: 360px;
    pointer-events: none;
    transition: opacity 0.15s ease;
    opacity: 0;
    visibility: hidden;
}
.chart-tooltip-custom .tooltip-date {
    color: #8a8a8a;
    font-size: 12px;
    font-weight: normal;
    letter-spacing: 0.02em;
    margin-bottom: 6px;
}
.chart-tooltip-custom .tooltip-summary {
    color: #2563eb;
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 10px;
}
.chart-tooltip-custom .tooltip-narrative {
    font-weight: normal;
    font-size: 12px;
    margin-bottom: 6px;
}
.chart-tooltip-custom .tooltip-narrative-label {
    color: #8a8a8a;
}
.chart-tooltip-custom .tooltip-narrative-title {
    color: #555;
}
.chart-tooltip-custom .tooltip-narrative-count {
    font-weight: inherit;
    /* color set via inline style (narrative color) so each entry is one color */
}
.chart-tooltip-custom .tooltip-daily-topic {
    font-size: 12px;
    margin-bottom: 10px;
    padding-left: 0.5em;
    border-left: 2px solid;
}
.chart-tooltip-custom .tooltip-daily-topic-value {
    font-weight: inherit;
    /* color set via inline style (narrative color) */
}
.chart-tooltip-custom .tooltip-daily-topic-label {
    color: #8a8a8a;
    font-weight: normal;
}
.chart-tooltip-custom .tooltip-daily-topic-value {
    color: #555;
    font-weight: normal;
}
.chart-tooltip-custom .tooltip-price {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0,0,0,0.06);
}
.chart-tooltip-custom .tooltip-price-label {
    color: #8a8a8a;
    font-weight: normal;
}
.chart-tooltip-custom .tooltip-price-value {
    color: #c0392b;
    font-weight: normal;
}

/* HTML legend: grid so two rows align; alternating background per item */
.chart-legend-html {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px 16px;
    align-items: stretch;
    padding: 12px 0 14px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}
.chart-legend-item {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 12px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 12px;
    color: #333;
    text-align: left;
    min-width: 0;
}
.chart-legend-item:nth-child(odd),
.chart-legend-item:nth-child(even) {
    background: #FAFBFC;
    border-radius: 12px;
}
.chart-legend-item:hover {
    filter: brightness(0.97);
}
.chart-legend-box {
    flex-shrink: 0;
    width: 20px;
    height: 4px;
    border-radius: 2px;
    margin-top: 7px;
}
.chart-legend-label {
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
    min-width: 0;
}

/* Breakdown chart: horizontal row - short labels compact, narrative gets remaining space */
.breakdown-chart-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px 10px;
    padding: 8px 0 10px;
}
.breakdown-chart-legend .chart-legend-item {
    padding: 6px 10px;
    background: #f0f4f8;
    flex: 0 0 auto;
    max-width: 100%;
}
.breakdown-chart-legend .chart-legend-item:last-child {
    flex: 1 1 140px;
    min-width: 0;
}
.breakdown-chart-legend .chart-legend-item:nth-child(odd) {
    background: #f0f4f8;
}
.breakdown-chart-legend .chart-legend-item:nth-child(even) {
    background: #e8eef4;
}
.breakdown-chart-legend .chart-legend-label {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Insights: KPI cards + vertical timeline (when used inside chart section via .insights-in-chart-title) */
.insights-section {
    margin-top: 20px;
}
.insights-section.insights-editorial {
    background: #fafafa;
    padding: 24px 28px;
    margin-bottom: 20px;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
}
.insights-editorial h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
    letter-spacing: 0.02em;
}
.insights-content {
    margin-top: 0;
}

/* ===== Narrative Insights — 5-Layer Card Layout ===== */

/* --- Layer 1: KPI Summary Bar --- */
.ni-kpi-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.ni-kpi {
    flex: 1 1 140px;
    min-width: 120px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.ni-kpi--wide {
    flex: 2 1 220px;
}
.ni-kpi-label {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin-bottom: 6px;
}
.ni-kpi-val {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
}
.ni-kpi-num {
    font-weight: 400;
    color: #6b7280;
    font-size: 14px;
}
.ni-kpi-sub {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: #9ca3af;
    margin-top: 2px;
}
.ni-kpi-desc {
    font-size: 10px;
    color: #9ca3af;
    margin-top: 4px;
    line-height: 1.3;
}
.ni-trend { font-weight: 600; }
.ni-trend.up { color: #059669; }
.ni-trend.down { color: #dc2626; }

.ni-hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    font-size: 9px;
    font-weight: 700;
    color: #9ca3af;
    border: 1px solid #d1d5db;
    border-radius: 50%;
    cursor: help;
    vertical-align: middle;
    margin-left: 3px;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.15s, border-color 0.15s;
}
.ni-hint:hover {
    color: #4f46e5;
    border-color: #818cf8;
}
.ni-tooltip {
    position: fixed;
    z-index: 9999;
    padding: 10px 14px;
    background: #1e293b;
    color: #f1f5f9;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.1s;
    max-width: 280px;
}

.ni-situation {
    font-size: 14px;
    line-height: 1.65;
    color: #374151;
    padding: 12px 0 4px;
    margin-bottom: 12px;
}

.ni-alert {
    margin-bottom: 16px;
    padding: 14px 16px;
    background: #fffbeb;
    border-radius: 8px;
    font-size: 13px;
    color: #1a1a1a;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.ni-alert-icon {
    flex-shrink: 0;
    font-size: 16px;
    margin-top: 1px;
}

/* --- Collapsible Section --- */
.ni-section {
    margin-bottom: 4px;
    background: transparent;
}
.ni-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    cursor: pointer;
    user-select: none;
    background: transparent;
    transition: opacity 0.15s;
}
.ni-section-header:hover {
    opacity: 0.75;
}
.ni-section.collapsed .ni-section-header {
    border-bottom: none;
}
.ni-chevron {
    display: inline-block;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    background: none;
    position: relative;
}
.ni-chevron::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 7px;
    height: 7px;
    border-right: 2px solid #6b7280;
    border-bottom: 2px solid #6b7280;
    transform: rotate(45deg);
    transition: transform 0.2s;
}
.ni-section.collapsed .ni-chevron::after {
    transform: rotate(-45deg);
    top: 6px;
}
.ni-section-title {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}
.ni-badge {
    font-size: 11px;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, monospace;
    color: #6b7280;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    padding: 1px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}
.ni-scope {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6366f1;
    background: #eef2ff;
    border-radius: 4px;
    padding: 2px 7px;
}
.ni-section-body {
    padding: 14px 16px;
}
.ni-section.collapsed .ni-section-body {
    display: none;
}

/* --- Card (insight / anomaly / correlation items) --- */
.ni-card {
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #374151;
    line-height: 1.55;
    border-left: 3px solid transparent;
}
.ni-card:last-child {
    margin-bottom: 0;
}
.ni-card--featured {
    background: #eff6ff;
    border-color: #bfdbfe;
    border-left: 4px solid #2563eb;
}
.ni-card--anomaly {
    border-left: 4px solid #dc2626;
}
.ni-card--correlation {
    border-left: 4px solid #2563eb;
}
.ni-card-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    margin-bottom: 6px;
}
.ni-card--featured .ni-card-label {
    color: #1d4ed8;
}
.ni-card-body {
    color: #1f2937;
    margin-bottom: 0;
}
.ni-card-body .narrative-highlight {
    font-weight: 600;
    font-size: 1.05em;
}
.ni-card-meta {
    font-size: 12px;
    color: #6b7280;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
    font-family: ui-monospace, SFMono-Regular, monospace;
    line-height: 1.5;
}

/* Shared: narrative links */
.narrative-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}
.narrative-link:hover {
    text-decoration: underline;
}

/* Evidence tag */
.insight-evidence-tag {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #0369a1;
    background: #e0f2fe;
    border-radius: 3px;
    padding: 2px 6px;
    margin-right: 6px;
    vertical-align: baseline;
}

/* --- Behavioral Patterns (pill layout, reused inside ni-section) --- */
.bp-group {
    margin-bottom: 12px;
}
.bp-group:last-child {
    margin-bottom: 0;
}
.bp-group-title {
    font-size: 11px;
    font-weight: 700;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e5e7eb;
}
.bp-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 13px;
    line-height: 1.4;
    flex-wrap: wrap;
}
.bp-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, monospace;
    padding: 3px 9px;
    border-radius: 5px;
    min-width: 52px;
    text-align: center;
    flex-shrink: 0;
}
.bp-pill--positive {
    background: #dcfce7;
    color: #166534;
}
.bp-pill--negative {
    background: #fee2e2;
    color: #991b1b;
}
.bp-pill--neutral {
    background: #f1f5f9;
    color: #475569;
}
.bp-label {
    color: #374151;
}
.bp-sep {
    color: #d1d5db;
    font-size: 11px;
    font-weight: 400;
    flex-shrink: 0;
    user-select: none;
}
.bp-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, monospace;
    color: #6b7280;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 1px 6px;
    white-space: nowrap;
}
.bp-strength {
    font-size: 11px;
    color: #9ca3af;
}

@keyframes spin { to { transform: rotate(360deg); } }

.insights-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 0;
    gap: 12px;
    color: #6b7280;
    font-size: 13px;
}
.insights-loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #E4E7ED;
    border-top-color: #001AFF;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.insights-empty {
    color: #6b7280;
    font-size: 13px;
    padding: 24px 0;
    text-align: center;
}

.narrative-detail {
    margin-top: 10px;
    padding: 8px 15px 20px;
    background: #f8f9fa;
    border-radius: 18px;
    display: none;
    min-width: 0;
    overflow-x: auto;
}

.narrative-detail .chart-container {
    margin-top: 8px;
    margin-bottom: 28px;
    min-width: 280px;
    width: 100%;
    max-width: 100%;
}

/* Breakdown chart: flexible on narrow viewports */
.narrative-detail.show {
    display: block;
}

@media (max-width: 640px) {
    .narrative-detail .chart-container {
        min-width: 240px;
    }
}

.view-chart-btn {
    margin-top: 0;
    padding: 6px 12px;
    background: #001AFF;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    width: fit-content;
}

.view-chart-btn:hover {
    background: #0014CC;
}

.close-chart-btn {
    position: relative;
    z-index: 10;
    float: right;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 12px;
}

.close-chart-btn:hover {
    background: #c82333;
}

/* Home page styles */
.home-header {
    text-align: center;
    margin-bottom: 28px;
    padding: 40px 20px 0;
}

.home-header img {
    display: block;
    margin: 0 auto 14px;
}

.home-header h1 {
    font-size: 26px;
    margin-bottom: 6px;
}

.home-content {
    max-width: 480px;
    margin: 0 auto;
}

.home-section {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    border: 1px solid #e8e8e8;
    margin-bottom: 16px;
}

.home-section h2 {
    font-size: 17px;
    color: #1e1e1e;
    margin-bottom: 16px;
    font-weight: 600;
}

.home-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.form-input {
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #001AFF;
}

.form-hint {
    font-size: 12px;
    color: #666;
    margin-top: -4px;
}

.btn-primary {
    padding: 11px 24px;
    background: #001AFF;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
}

.btn-primary:hover {
    background: #0014CC;
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.home-divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.home-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #ddd;
}

.home-divider span {
    position: relative;
    background: #f5f5f5;
    padding: 0 20px;
    color: #666;
    font-size: 14px;
}

.result-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 12px;
    font-size: 14px;
}

.result-message.loading {
    background: #e3f2fd;
    color: #1976d2;
    text-align: center;
}

.result-message.error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.result-message.success {
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.success-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    text-align: center;
}

.success-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #22c55e;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
}

.success-title {
    font-size: 20px;
    font-weight: 600;
    color: #1e1e1e;
}

.success-message {
    font-size: 14px;
    color: #666;
}

.api-key-display {
    width: 100%;
    margin-top: 10px;
}

.api-key-display label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.api-key-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 12px;
}

.api-key-box code {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #333;
    word-break: break-all;
    padding: 4px 0;
}

.btn-copy {
    padding: 6px 12px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-copy:hover {
    background: #5a6268;
}

.success-actions {
    margin-top: 10px;
}

.success-actions .btn-primary {
    width: 100%;
}

/* Tab styles */
.tabs-container {
    display: flex;
    gap: 0;
    margin: 20px 0 0;
    background: transparent;
    padding: 0;
}

.tab-btn {
    padding: 10px 0;
    margin-right: 28px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    color: #888;
    font-weight: 500;
    transition: color 0.15s, border-color 0.15s;
    margin-bottom: -1px;
}

.tab-btn:hover {
    color: #111;
}

.tab-btn.active {
    color: #111;
    border-bottom-color: #001AFF;
    font-weight: 600;
}

.tab-content {
    display: none;
    padding: 20px 0;
    margin-bottom: 20px;
}

.tab-content.active {
    display: block;
}

.tab-content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.tab-content-header h2 {
    margin: 0;
    font-size: 20px;
    color: #1e1e1e;
}

.btn-copy-json, .btn-copy-code {
    padding: 8px 16px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-copy-json:hover, .btn-copy-code:hover {
    background: #5a6268;
}

/* JSON Response styles */
.json-response-container {
    max-height: 600px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.json-tree {
    margin: 0;
}

.json-toggle {
    cursor: pointer;
    color: #001AFF;
    margin-right: 5px;
    user-select: none;
    font-weight: bold;
}

.json-toggle:hover {
    color: #0014CC;
}

.json-key {
    color: #881391;
    font-weight: 600;
}

.json-string {
    color: #0d7377;
}

.json-number {
    color: #1e88e5;
}

.json-boolean {
    color: #f57c00;
}

.json-null {
    color: #999;
    font-style: italic;
}

.json-bracket, .json-brace {
    color: #333;
    font-weight: bold;
}

.json-children {
    margin-left: 20px;
    border-left: 1px solid #ddd;
    padding-left: 10px;
}

.json-item {
    margin: 2px 0;
}

/* Example Code styles */
.example-code-container {
    max-height: 600px;
    overflow-y: auto;
}

.example-code-block {
    margin: 0;
    padding: 15px;
    background: #1e1e1e;
    border: 1px solid #3e3e3e;
    border-radius: 12px;
    overflow-x: auto;
}

.example-code-block code {
    font-family: 'Fira Code', 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #d4d4d4;
    display: block;
    white-space: pre;
    background: transparent !important; /* Let Prism.js handle syntax highlighting */
}

/* Documentation styles */
.documentation-container {
    max-height: 600px;
    overflow-y: auto;
}

.docs-content {
    max-width: 900px;
    margin: 0 auto;
}

.docs-content h2 {
    font-size: 24px;
    color: #1e1e1e;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ddd;
}

.docs-section {
    margin-bottom: 40px;
}

.docs-section h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.docs-section p {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #555;
}

.docs-section code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #e83e8c;
}

.docs-section ul, .docs-section ol {
    margin-left: 20px;
    margin-bottom: 15px;
    line-height: 1.8;
}

.docs-section li {
    margin-bottom: 8px;
    color: #555;
}

/* Response format tree: hierarchical outline with highlighted field names */
.response-format-tree {
    margin: 12px 0 20px;
    line-height: 1.75;
    color: #333;
}

.resp-tree--root {
    list-style-type: disc;
    margin-left: 20px;
    padding-left: 0;
}

.resp-tree--nested {
    list-style-type: circle;
    margin-left: 24px;
    margin-top: 6px;
    margin-bottom: 6px;
}

.resp-tree li {
    margin-bottom: 6px;
}

.resp-field {
    font-family: 'Courier New', Consolas, monospace;
    font-size: 13px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(248, 180, 180, 0.45);
    color: #b91c1c;
    font-weight: 500;
}

.resp-field--narrative {
    background: rgba(167, 223, 186, 0.55);
    color: #15803d;
}

.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    overflow: hidden;
}

.docs-table thead {
    background: #f8f9fa;
}

.docs-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #dee2e6;
}

.docs-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    color: #555;
}

.docs-table tr:last-child td {
    border-bottom: none;
}

.docs-table code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 12px;
}

.docs-code-example {
    margin: 15px 0;
    padding: 15px;
    background: #1e1e1e;
    border: 1px solid #3e3e3e;
    border-radius: 12px;
    overflow-x: auto;
}

.docs-code-example code {
    font-family: 'Fira Code', 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.6;
    color: #d4d4d4;
    display: block;
    white-space: pre;
    background: transparent !important; /* Let Prism.js handle syntax highlighting */
}

/* Searchable ticker dropdown */
.ticker-search-wrapper {
    position: relative;
    min-width: 120px;
}

.ticker-search-input {
    background: #fff;
    cursor: text;
    padding-right: 14px;
    width: 100%;
    box-sizing: border-box;
}

.ticker-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 100%;
    max-height: 240px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    z-index: 200;
}

.ticker-option {
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #111;
    cursor: pointer;
}

.ticker-option:hover {
    background: #f0f3ff;
    color: #001AFF;
}

.ticker-option-locked {
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #bbb;
    cursor: not-allowed;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticker-option-locked:hover {
    background: #fafafa;
}

.ticker-lock-badge {
    font-size: 10px;
    font-weight: 600;
    color: #999;
    background: #f0f0f0;
    border-radius: 4px;
    padding: 2px 6px;
    letter-spacing: 0.3px;
}

.ticker-option-empty {
    padding: 10px 14px;
    font-size: 13px;
    color: #999;
}

/* Dominant narrative title in summary card */
.dominant-narrative-title {
    font-size: 14px;
    font-weight: 600;
    color: #111;
    line-height: 1.4;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
