@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700;900&family=JetBrains+Mono:wght@400;700;800&family=Outfit:wght@300;400;600;800;900&display=swap');

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

body {
    min-height: 100vh;
    background: #080c14;
    color: #e2e8f0;
    font-family: 'Noto Sans KR', 'JetBrains Mono', sans-serif;
}

/* ── Header ── */
header {
    padding: 24px 32px;
    border-bottom: 1px solid #0f2a1e;
    background: linear-gradient(180deg, #0a1a12 0%, #080c14 100%);
}

.header-inner { max-width: 1200px; margin: 0 auto; }

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.logo-wrap { display: flex; align-items: center; gap: 12px; }

.logo-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #10b981, #059669);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 900; color: #fff;
    font-family: 'Outfit', sans-serif;
}

.logo-title {
    font-size: 22px; font-weight: 900;
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, #34d399, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.logo-sub { font-size: 11px; color: #64748b; letter-spacing: 0.1em; margin-top: 2px; }

.search-wrap { display: flex; gap: 8px; align-items: center; position: relative; }

.search-input {
    padding: 10px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: 10px;
    color: #e2e8f0;
    font-size: 14px;
    font-family: 'JetBrains Mono', monospace;
    outline: none;
    width: 260px;
    text-transform: none;
}

.search-input:focus { border-color: #10b981; }

.btn-search {
    padding: 10px 22px;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none; border-radius: 10px;
    color: #fff; font-size: 14px; font-weight: 700;
    cursor: pointer;
    font-family: 'Noto Sans KR', sans-serif;
}

/* ── Search Dropdown ── */
#search-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 300px;
    background: #0d1f17;
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    z-index: 100;
    overflow: hidden;
}

.dd-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s;
}

.dd-item:hover { background: rgba(16,185,129,0.08); }

.dd-symbol {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    color: #34d399;
    min-width: 60px;
}

.dd-desc {
    font-size: 13px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.popular-stocks { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

.btn-stock {
    padding: 6px 16px;
    background: rgba(16,185,129,0.06);
    border: 1px solid rgba(16,185,129,0.15);
    border-radius: 20px;
    color: #6ee7b7;
    font-size: 13px; font-weight: 600;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-stock:hover, .btn-stock.active {
    background: rgba(16,185,129,0.15);
    border-color: rgba(16,185,129,0.4);
    color: #34d399;
}

/* ── Main ── */
main { max-width: 1200px; margin: 0 auto; padding: 24px 32px; }

/* ── Demo Banner ── */
.demo-banner {
    padding: 16px 20px;
    background: #1e293b;
    border: 1px solid #f59e0b44;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 13px;
    color: #fbbf24;
    line-height: 1.6;
    font-family: 'Noto Sans KR', sans-serif;
}

.demo-banner a { color: #60a5fa; }

/* ── Landing Hero ── */
.landing { padding: 60px 0 40px; }

.landing-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    padding-bottom: 60px;
}

.landing-copy { max-width: 420px; }

.landing-badge {
    display: inline-block;
    font-size: 12px; font-weight: 600;
    color: #34d399;
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: 20px;
    padding: 6px 16px;
    margin-bottom: 24px;
    letter-spacing: 0.02em;
}

.landing-headline {
    font-size: 40px; font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.03em;
    color: #f1f5f9;
    font-family: 'Outfit', sans-serif;
    margin: 0 0 16px;
}

.landing-accent { color: #10b981; }

.landing-desc {
    font-size: 15px; color: #94a3b8;
    line-height: 1.7; margin-bottom: 24px;
    font-family: 'Noto Sans KR', sans-serif;
}

.landing-live {
    display: flex; align-items: center; gap: 10px;
    font-size: 13px; color: #6ee7b7;
}

.landing-live-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px rgba(16,185,129,0.6);
    flex-shrink: 0;
}

/* Preview card */
.landing-preview {
    width: 340px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 28px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.landing-preview-glow {
    position: absolute; inset: -1px; border-radius: 16px;
    background: linear-gradient(135deg, rgba(16,185,129,0.12), transparent 60%);
    pointer-events: none;
}

.landing-preview-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 20px; position: relative;
}

.landing-preview-name {
    font-size: 18px; font-weight: 800; color: #f1f5f9;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 6px;
}

.landing-preview-ticker {
    font-size: 11px;
    background: rgba(16,185,129,0.15);
    color: #6ee7b7;
    padding: 2px 8px; border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
}

.landing-preview-price {
    font-size: 22px; font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    color: #f1f5f9;
}

.landing-preview-metrics {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    margin-bottom: 14px; position: relative;
}

.landing-metric {
    background: rgba(255,255,255,0.03);
    border-radius: 10px; padding: 10px 14px;
}

.landing-metric-label { font-size: 11px; color: #64748b; margin-bottom: 4px; }
.landing-metric-value { font-size: 16px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }

.landing-preview-graham {
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: 10px; padding: 10px 16px;
    text-align: center; font-size: 13px;
    font-weight: 600; color: #6ee7b7;
    position: relative;
}

.landing-preview-blur {
    position: absolute; bottom: 0; left: 0; right: 0; height: 48px;
    background: linear-gradient(transparent, #080c14);
    pointer-events: none;
}

/* Feature badges */
.landing-features {
    display: flex; justify-content: center; gap: 40px;
    flex-wrap: wrap;
    padding: 32px 0;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.landing-feature { text-align: center; max-width: 180px; }
.landing-feature-icon { font-size: 28px; margin-bottom: 10px; }
.landing-feature-title { font-size: 14px; font-weight: 700; color: #e2e8f0; margin-bottom: 4px; }
.landing-feature-desc { font-size: 12px; color: #64748b; }

/* ── Error State ── */
.error-state { text-align: center; padding: 60px 0; }
.error-state .icon { font-size: 40px; margin-bottom: 12px; }
.error-state p { color: #ef4444; font-size: 14px; }

/* ── Stock Header ── */
.stock-header {
    background: linear-gradient(135deg, #0a1a12, #0d2018);
    border: 1px solid rgba(16,185,129,0.15);
    border-radius: 20px;
    padding: 28px 32px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.stock-header-top-bar {
    position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, #059669, #10b981, #34d399);
}

.stock-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
}

.stock-name-wrap { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.stock-company-name { font-size: 28px; font-weight: 900; font-family: 'Outfit', sans-serif; color: #f1f5f9; }
.stock-ticker-badge {
    padding: 4px 10px;
    background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.25);
    border-radius: 6px; font-size: 13px; font-weight: 700;
    color: #34d399; font-family: 'JetBrains Mono', monospace;
}

.stock-meta { color: #64748b; font-size: 13px; margin-top: 4px; }

.stock-price-block { text-align: right; }
.stock-price { font-size: 36px; font-weight: 900; font-family: 'JetBrains Mono', monospace; color: #f1f5f9; }
.stock-graham-diff { font-size: 13px; margin-top: 4px; }

.stock-fetched-at {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 8px; padding: 4px 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    font-size: 11px; color: #64748b;
}

.stock-fetched-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 6px rgba(16,185,129,0.5);
    flex-shrink: 0;
}

/* ── Grid ── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 20px;
}

/* ── Card ── */
.card {
    background: linear-gradient(135deg, #0a1a12 0%, #0d2018 100%);
    border: 1px solid rgba(16,185,129,0.1);
    border-radius: 16px;
    padding: 20px 24px;
    position: relative;
    overflow: hidden;
}

.card-shimmer {
    position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(16,185,129,0.3), transparent);
}

.card-title {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 16px;
}

.card-icon { font-size: 18px; }

.card-title h3 {
    font-size: 14px; font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-family: 'Noto Sans KR', sans-serif;
}

/* ── Gauge Bar ── */
.gauge-item { margin-bottom: 16px; }
.gauge-label-row { display: flex; justify-content: space-between; margin-bottom: 4px; }
.gauge-label { color: #94a3b8; font-size: 13px; font-family: 'Noto Sans KR', sans-serif; }
.gauge-value { font-size: 14px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }

.gauge-track {
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}

.gauge-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Graham Box ── */
.graham-box {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.05);
}

.graham-row { display: flex; justify-content: space-between; margin-bottom: 6px; }
.graham-row:last-child { margin-bottom: 0; }
.graham-label { color: #64748b; font-size: 12px; }
.graham-val { font-weight: 700; font-size: 14px; font-family: 'JetBrains Mono', monospace; }

.graham-badge {
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    text-align: center;
    font-weight: 600;
}

/* ── Dividend Note ── */
.dividend-note {
    margin-top: 8px;
    padding: 10px 14px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    font-size: 11px;
    color: #64748b;
    line-height: 1.5;
}

/* ── Donut ── */
.donut-wrap { display: flex; align-items: center; gap: 20px; }

.donut-legend { display: flex; flex-direction: column; gap: 4px; }

.donut-legend-item { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.donut-legend-dot { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.donut-legend-label { color: #94a3b8; font-family: 'Noto Sans KR', sans-serif; }
.donut-legend-count { color: #e2e8f0; font-weight: 700; font-family: 'JetBrains Mono', monospace; margin-left: auto; }

.buy-pct-box {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    text-align: center;
}

.buy-pct-num { font-size: 20px; font-weight: 900; font-family: 'JetBrains Mono', monospace; }
.buy-pct-label { font-size: 11px; color: #94a3b8; margin-top: 2px; }

/* ── Bar Chart (YOY / EPS) ── */
.bar-list { display: flex; flex-direction: column; gap: 8px; }

.bar-row { display: flex; align-items: center; gap: 10px; }
.bar-year { flex-shrink: 0; font-size: 12px; font-family: 'JetBrains Mono', monospace; }

.bar-track {
    flex: 1; height: 22px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.bar-fill.positive { background: linear-gradient(90deg, #059669, #10b981); }
.bar-fill.negative { background: linear-gradient(90deg, #dc2626, #ef4444); }
.bar-fill.current  { background: linear-gradient(90deg, #d97706, #f59e0b); }
.bar-fill.estimate { background: linear-gradient(90deg, #2563eb, #3b82f6); }

.bar-label {
    position: absolute;
    right: 8px; top: 50%;
    transform: translateY(-50%);
    font-size: 11px; font-weight: 700;
    color: #e2e8f0;
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
}

/* ── EPS Growth Row ── */
.eps-growth-row {
    margin-top: 12px; padding: 10px 14px;
    background: #0f172a; border-radius: 8px;
    display: flex; justify-content: space-between;
}
.eps-growth-label { color: #64748b; font-size: 12px; }
.eps-growth-val { font-weight: 700; font-size: 14px; font-family: 'JetBrains Mono', monospace; }

/* ── Checks ── */
.check-list { display: flex; flex-direction: column; gap: 8px; }

.check-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px;
    border-radius: 8px;
    border-left: 3px solid;
    margin-bottom: 6px;
}

.check-item-label { color: #94a3b8; font-size: 13px; font-weight: 600; }
.check-item-text  { font-size: 13px; font-weight: 700; }

.disclaimer {
    margin-top: 8px; padding: 12px;
    background: rgba(0,0,0,0.3); border-radius: 8px;
    font-size: 11px; color: #64748b; line-height: 1.6;
}

/* ── Insight Quotes ── */
.insight-box {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.insight-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 12px;
    margin-top: 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    cursor: default;
    transition: background 0.25s ease, border-color 0.25s ease;
    min-height: 32px;
}

.insight-item:hover {
    background: rgba(16,185,129,0.08);
    border-color: rgba(16,185,129,0.2);
}

.insight-icon {
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 1px;
}

.insight-text {
    font-size: 11.5px;
    color: #94a3b8;
    line-height: 1.5;
    font-family: 'Noto Sans KR', sans-serif;
}

.insight-name {
    font-weight: 700;
    color: #10b981;
}

.insight-name--yellow { color: #fbbf24; }
.insight-name--teal   { color: #6ee7b7; }

/* ── No-data placeholders ── */
.no-data { color: #6b7280; font-size: 13px; }

/* ── Footer ── */
footer {
    padding: 24px 32px;
    border-top: 1px solid rgba(255,255,255,0.05);
    text-align: center;
    margin-top: 40px;
}

footer p { color: #475569; font-size: 12px; margin: 0; }
footer p + p { color: #334155; font-size: 11px; margin-top: 4px; }

.footer-disclaimer {
    max-width: 680px;
    margin: 0 auto 10px !important;
    color: #334155 !important;
    font-size: 11px !important;
    line-height: 1.7;
    padding: 10px 16px;
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
}
