:root {
    --primary: #e7dbc1;
    --primary-dark: #d7c9ab;
    --primary-light: rgba(231, 219, 193, 0.12);

    --ink: #f2e8d4;
    --ink-soft: #d7ccb8;
    --ink-muted: #b9ad96;

    --line: rgba(241, 233, 210, 0.14);
    --line-strong: rgba(241, 233, 210, 0.24);

    --bg: #23463f;
    --bg-dark: #1c3933;
    --bg-soft: #2a5249;
    --card: rgba(255, 255, 255, 0.05);
    --card-strong: rgba(255, 255, 255, 0.07);
    --white: #ffffff;

    --success: #bfd8ac;
    --warning: #dccb92;
    --danger: #d9a79d;
    --info: #c8d7bf;

    --shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.16);

    --radius: 24px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.04), transparent 24%),
        radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.03), transparent 20%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-dark) 100%);
    color: var(--ink);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.11;
    z-index: 0;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='%23ffffff' fill-opacity='.28'%3E%3Ccircle cx='10' cy='16' r='1'/%3E%3Ccircle cx='36' cy='22' r='1'/%3E%3Ccircle cx='58' cy='10' r='1'/%3E%3Ccircle cx='82' cy='36' r='1'/%3E%3Ccircle cx='122' cy='18' r='1'/%3E%3Ccircle cx='146' cy='34' r='1'/%3E%3Ccircle cx='20' cy='78' r='1'/%3E%3Ccircle cx='52' cy='70' r='1'/%3E%3Ccircle cx='90' cy='92' r='1'/%3E%3Ccircle cx='130' cy='84' r='1'/%3E%3Ccircle cx='32' cy='130' r='1'/%3E%3Ccircle cx='70' cy='142' r='1'/%3E%3Ccircle cx='120' cy='126' r='1'/%3E%3C/g%3E%3C/svg%3E");
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* =========================
   HEADER
========================= */
.app-header {
    padding: 30px 0 22px;
    margin-bottom: 18px;
}

.header-topbar {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    padding: 8px 13px;
    border-radius: 999px;
    margin-bottom: 14px;
    backdrop-filter: blur(10px);
}

.logo h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(34px, 5vw, 58px);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.03em;
    color: var(--ink);
    text-shadow: 0 1px 0 rgba(255,255,255,0.04);
}

.logo span {
    color: var(--primary);
}

.subtitle {
    margin-top: 14px;
    color: var(--ink-soft);
    max-width: 760px;
    font-size: 16px;
    line-height: 1.8;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* =========================
   BUTTONS
========================= */
.analysis-header-btn,
.primary-cta,
.quick-analyze-btn,
.analyze-btn,
.login-btn {
    border: 1px solid rgba(231, 219, 193, 0.18);
    color: #1c3933;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 9px;
    padding: 8px 18px;
    font-weight: 800;
    box-shadow: 0 12px 30px rgba(231, 219, 193, 0.16);
    transition: transform 0.22s ease, box-shadow 0.22s ease, opacity 0.22s ease;
}

.analysis-header-btn:hover,
.primary-cta:hover,
.quick-analyze-btn:hover,
.analyze-btn:hover,
.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(231, 219, 193, 0.20);
}

.top-nav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.nav-pill,
.ghost-cta,
.preset-chip,
.idea-btn.ghost {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink);
    border-radius: 999px;
    padding: 12px 16px;
    font-weight: 700;
    backdrop-filter: blur(10px);
    transition: all 0.22s ease;
}

.nav-pill:hover,
.ghost-cta:hover,
.preset-chip:hover,
.idea-btn.ghost:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--line-strong);
}

.nav-pill.active {
    background: var(--primary);
    color: #1c3933;
    border-color: var(--primary);
}

/* =========================
   LAYOUT
========================= */
.app-main {
    padding-bottom: 48px;
}

.section-anchor {
    scroll-margin-top: 120px;
}

.glass-card,
.summary-card,
.idea-card,
.method-card,
.footer-content,
.modal-content,
.analysis-header-compact,
.price-section-compact,
.valuation-section,
.levels-section,
.targets-section,
.technical-section,
.quality-section,
.risk-section,
.strategy-section,
.trade-analysis-section,
.insight-summary-card,
.verdict-box,
.notes-section,
.timing-section {
    background: linear-gradient(180deg, var(--card-strong) 0%, var(--card) 100%);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.hero-panel {
    margin-bottom: 28px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 20px;
}

.hero-copy,
.hero-side {
    border-radius: 30px;
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.hero-copy::before,
.hero-side::before,
.idea-card::before,
.method-card::before,
.summary-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,0.05), transparent 48%);
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    color: var(--primary);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    margin-bottom: 14px;
}

.section-badge.neutral {
    color: var(--ink-soft);
    background: rgba(255,255,255,0.05);
}

.section-badge.success {
    color: var(--success);
    background: rgba(191, 216, 172, 0.08);
}

.section-badge.dark {
    color: var(--primary);
    background: rgba(255,255,255,0.04);
}

.hero-copy h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(30px, 4vw, 50px);
    line-height: 1.08;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
}

.hero-copy p,
.hero-side p,
.section-heading p,
.method-card li,
.footer-text {
    color: var(--ink-soft);
}

.hero-cta-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 24px 0 24px;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.metric-box {
    padding: 17px;
    background: rgba(255,255,255,0.04);
    border-radius: 20px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.metric-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
    margin-bottom: 4px;
    font-weight: 700;
}

.metric-value {
    font-size: 17px;
    font-weight: 800;
    color: var(--ink);
}

/* =========================
   SEARCH / INPUT
========================= */
.quick-analyze-card h3 {
    font-size: 26px;
    margin-bottom: 6px;
}

.quick-search-box,
.stock-input-group {
    display: flex;
    gap: 10px;
    margin: 18px 0;
}

.quick-stock-input,
.stock-input,
.login-input {
    width: 100%;
    border-radius: 18px;
    border: 1px solid var(--line);
    padding: 14px 16px;
    background: rgba(255,255,255,0.05);
    color: var(--ink);
    outline: none;
    backdrop-filter: blur(8px);
}

.quick-stock-input::placeholder,
.stock-input::placeholder,
.login-input::placeholder {
    color: var(--ink-muted);
}

.quick-stock-input:focus,
.stock-input:focus,
.login-input:focus {
    border-color: rgba(231, 219, 193, 0.4);
    box-shadow: 0 0 0 4px rgba(231, 219, 193, 0.08);
}

.preset-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* =========================
   SUMMARY
========================= */
.summary-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.summary-card {
    border-radius: 24px;
    padding: 20px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
}

.summary-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--line);
    font-size: 22px;
}

/* =========================
   SECTION
========================= */
.content-section {
    margin-bottom: 32px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 18px;
}

.section-heading h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 34px;
    line-height: 1.08;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.idea-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.idea-card {
    border-radius: 26px;
    padding: 22px;
    position: relative;
    overflow: hidden;
}

.idea-card.trading,
.idea-card.investing {
    background: linear-gradient(180deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.04) 100%);
}

.idea-card-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.idea-ticker {
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    color: var(--ink);
}

.idea-profile {
    font-size: 13px;
    color: var(--ink-muted);
    margin-top: 6px;
    font-weight: 700;
}

.idea-style-badge {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--line);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    color: var(--primary);
}

.idea-thesis {
    color: var(--ink-soft);
    min-height: 72px;
    margin-bottom: 16px;
}

.idea-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.idea-tag {
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--line);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}

.idea-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.idea-btn {
    border-radius: 15px;
    padding: 11px 14px;
    font-weight: 700;
    border: 1px solid var(--line);
}

.idea-btn.primary {
    color: #1c3933;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: rgba(231, 219, 193, 0.18);
}

/* =========================
   METHODOLOGY
========================= */
.methodology-section {
    margin-bottom: 18px;
}

.screener-section {
    margin-bottom: 18px;
}

.method-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.method-card {
    border-radius: 26px;
    padding: 22px;
    position: relative;
    overflow: hidden;
}

.method-card h3 {
    margin-bottom: 12px;
    font-size: 20px;
    color: var(--ink);
}

.method-card ul {
    padding-left: 18px;
}

.method-card li + li {
    margin-top: 10px;
}

/* =========================
   FOOTER
========================= */
footer {
    padding: 0 0 26px;
}

.footer-content {
    border-radius: 26px;
    padding: 24px;
    text-align: center;
}

.footer-logo {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--primary);
}

/* =========================
   MODAL
========================= */
.analysis-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(8px);
    z-index: 1000;
    padding: 18px;
}

.analysis-modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    width: min(920px, 100%);
    max-height: 88vh;
    overflow-y: auto;
    border-radius: 30px;
}

.modal-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, #284d43 0%, #1c3933 100%);
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    border-radius: 30px 30px 0 0;
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    color: var(--ink);
}

.close-modal {
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.05);
    color: var(--ink);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 24px;
}

.modal-body {
    padding: 24px;
}

.modal-subtitle {
    color: var(--ink-soft);
    margin-bottom: 10px;
}

.btn-text,
.loading-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: #1c3933;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* =========================
   ANALYSIS RESULT
========================= */
.analysis-result {
    margin-top: 18px;
}

.analysis-result-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.analysis-header-compact,
.price-section-compact,
.valuation-section,
.levels-section,
.targets-section,
.technical-section,
.quality-section,
.risk-section,
.strategy-section,
.trade-analysis-section,
.insight-summary-card,
.verdict-box,
.notes-section,
.timing-section {
    border-radius: 24px;
    padding: 18px;
}

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

.stock-symbol-compact {
    font-size: 30px;
    font-weight: 800;
    color: var(--ink);
}

.stock-name-compact {
    font-size: 15px;
    color: var(--ink-soft);
}

.stock-sector-compact {
    font-size: 13px;
    color: var(--ink-muted);
}

.recommendation-badge-compact {
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    border: 1px solid transparent;
}

.badge-buy {
    background: rgba(191, 216, 172, 0.12);
    color: var(--success);
    border-color: rgba(191, 216, 172, 0.22);
}

.badge-hold {
    background: rgba(220, 203, 146, 0.12);
    color: var(--warning);
    border-color: rgba(220, 203, 146, 0.22);
}

.badge-sell {
    background: rgba(217, 167, 157, 0.12);
    color: var(--danger);
    border-color: rgba(217, 167, 157, 0.22);
}

.current-price {
    font-size: clamp(30px, 5vw, 42px);
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--ink);
}

.price-change {
    font-weight: 800;
    margin-bottom: 12px;
}

.price-change.positive {
    color: var(--success);
}

.price-change.negative {
    color: var(--danger);
}

.price-details {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    color: var(--ink-muted);
    font-size: 13px;
}

.valuation-grid,
.technical-grid,
.quality-grid,
.targets-grid,
.trade-metric-grid,
.insight-summary-grid,
.verdict-highlight-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.valuation-item,
.signal-item,
.quality-item,
.target-item,
.trade-metric,
.insight-card,
.verdict-highlight-item,
.timing-item,
.trade-single-line,
.level-item,
.strategy-item,
.risk-level {
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.04);
    padding: 14px;
}

.valuation-item.undervalued,
.target-item.conservative,
.signal-item.strong-buy,
.signal-item.buy,
.trade-bullish,
.risk-factor.low,
.timing-item.good,
.level-item.support {
    background: rgba(191, 216, 172, 0.10);
    border-color: rgba(191, 216, 172, 0.22);
    color: var(--success);
}

.target-item.moderate,
.signal-item.neutral,
.trade-neutral,
.risk-factor.medium,
.timing-item.neutral {
    background: rgba(220, 203, 146, 0.10);
    border-color: rgba(220, 203, 146, 0.22);
    color: var(--warning);
}

.target-item.aggressive,
.target-item.stoploss,
.signal-item.sell,
.signal-item.strong-sell,
.trade-bearish,
.risk-factor.high,
.timing-item.bad,
.level-item.resistance {
    background: rgba(217, 167, 157, 0.10);
    border-color: rgba(217, 167, 157, 0.22);
    color: var(--danger);
}

.level-item.current {
    background: rgba(200, 215, 191, 0.10);
    border-color: rgba(200, 215, 191, 0.22);
    color: var(--info);
}

.technical-grid,
.quality-grid,
.targets-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.signal-label,
.quality-label,
.target-label,
.valuation-label,
.trade-metric-label,
.insight-card-label,
.verdict-highlight-label,
.level-label,
.trade-score-label {
    font-size: 12px;
    font-weight: 800;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.signal-value,
.quality-score,
.target-price,
.valuation-value,
.trade-metric-value,
.insight-card-value,
.verdict-highlight-value,
.level-price,
.trade-score-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--ink);
}

.signal-indicator,
.valuation-desc,
.target-desc,
.trade-metric-sub,
.insight-card-subtext,
.verdict-footer-note,
.level-change,
.strategy-item,
.risk-labels,
.risk-label,
.timing-recommendation,
.trade-note,
.trade-single-line .label,
.trade-single-line .value {
    font-size: 13px;
    color: var(--ink-soft);
}

.levels-grid,
.strategy-content,
.risk-factors,
.trade-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.risk-content,
.trade-analysis-grid,
.insight-verdict-wrap {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.risk-track {
    position: relative;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, #8db38b 0%, #c8b579 55%, #c4897e 100%);
    overflow: hidden;
    margin: 10px 0 6px;
}

.risk-fill {
    height: 100%;
    background: rgba(255,255,255,0.28);
}

.risk-marker {
    position: absolute;
    top: -2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #f2e8d4;
    border: 2px solid #23463f;
    transform: translateX(-50%);
}

.risk-labels {
    display: flex;
    justify-content: space-between;
}

.trade-analysis-title,
.valuation-title,
.levels-title,
.targets-title,
.technical-title,
.quality-title,
.risk-title,
.strategy-title,
.timing-title,
.section-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 14px;
    color: var(--ink);
}

.trade-analysis-card,
.insight-summary-card,
.verdict-box {
    border-radius: 24px;
}

.trade-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
}

.trade-score {
    min-width: 94px;
    text-align: center;
}

.score-good {
    background: rgba(191, 216, 172, 0.10);
    border-color: rgba(191, 216, 172, 0.22);
    color: var(--success);
}

.score-mid {
    background: rgba(220, 203, 146, 0.10);
    border-color: rgba(220, 203, 146, 0.22);
    color: var(--warning);
}

.score-bad {
    background: rgba(217, 167, 157, 0.10);
    border-color: rgba(217, 167, 157, 0.22);
    color: var(--danger);
}

.trade-mode-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--ink);
}

.trade-mode-bias {
    margin-top: 4px;
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.insight-summary-grid,
.verdict-highlight-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.insight-card,
.verdict-highlight-item {
    border-radius: 18px;
}

.verdict-main-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--ink);
    margin-bottom: 14px;
}

.verdict-footer-note {
    background: rgba(255,255,255,0.04);
    border-style: dashed;
    border: 1px dashed var(--line);
    padding: 12px;
    border-radius: 16px;
}

.timing-item {
    text-align: center;
}

/* =========================
   ERROR / LOGIN
========================= */
.error-message-compact,
.error-message {
    margin-top: 12px;
    background: rgba(217, 167, 157, 0.12);
    color: var(--danger);
    border: 1px solid rgba(217, 167, 157, 0.22);
    border-radius: 16px;
    padding: 14px;
    text-align: center;
    font-weight: 700;
}

.login-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top left, rgba(255,255,255,0.04), transparent 24%),
        linear-gradient(180deg, var(--bg-soft) 0%, var(--bg-dark) 100%);
    z-index: 1200;
    padding: 16px;
}

.login-box {
    width: min(420px, 100%);
    background: linear-gradient(180deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.04) 100%);
    border-radius: 30px;
    padding: 34px 28px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.login-box h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 32px;
    margin-bottom: 10px;
    color: var(--ink);
}

.login-box p {
    color: var(--ink-soft);
    margin-bottom: 18px;
}

.error-message {
    display: none;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 980px) {
    .header-topbar,
    .hero-grid,
    .summary-strip,
    .method-grid,
    .idea-grid,
    .risk-content,
    .trade-analysis-grid,
    .insight-verdict-wrap {
        grid-template-columns: 1fr;
        display: grid;
    }

    .header-topbar {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .hero-metrics {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .hero-copy,
    .hero-side,
    .summary-card,
    .idea-card,
    .method-card,
    .modal-body,
    .analysis-header-compact,
    .price-section-compact,
    .valuation-section,
    .levels-section,
    .targets-section,
    .technical-section,
    .quality-section,
    .risk-section,
    .strategy-section,
    .trade-analysis-section,
    .insight-summary-card,
    .verdict-box,
    .timing-section,
    .notes-section,
    .footer-content {
        padding: 18px;
    }

    .analysis-header-compact,
    .trade-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .stock-input-group,
    .quick-search-box,
    .idea-actions {
        flex-direction: column;
    }

    .technical-grid,
    .quality-grid,
    .targets-grid,
    .valuation-grid,
    .trade-metric-grid,
    .insight-summary-grid,
    .verdict-highlight-row {
        grid-template-columns: 1fr;
    }

    .price-details {
        flex-direction: column;
        gap: 6px;
    }

    .top-nav {
        gap: 8px;
    }

    .nav-pill,
    .ghost-cta,
    .preset-chip,
    .idea-btn.ghost,
    .analysis-header-btn,
    .primary-cta,
    .quick-analyze-btn,
    .analyze-btn,
    .login-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .modal-content {
        max-height: 92vh;
    }

    .logo h1 {
        font-size: clamp(30px, 10vw, 48px);
    }

    .section-heading h2 {
        font-size: 28px;
    }
}

/* =========================
   MINI LIST (SCREENER TAMBAHAN)
========================= */

.mini-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mini-item {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--line);
    font-size: 12px;
    font-weight: 700;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.mini-item:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--line-strong);
}

.mini-ticker {
    font-weight: 800;
    color: var(--primary);
}

.mini-change.up {
    color: var(--success);
}

.mini-change.down {
    color: var(--danger);
}

/* =========================
   COMPACT LIST (MAIN)
========================= */

.compact-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.compact-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--line);
    transition: 0.2s;
}

.compact-row:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--line-strong);
}

.c-left {
    font-weight: 800;
    font-size: 14px;
}

.c-ticker {
    color: var(--primary);
}

.c-mid {
    display: flex;
    gap: 10px;
    font-size: 12px;
    align-items: center;
}

.c-change.up {
    color: var(--success);
}

.c-change.down {
    color: var(--danger);
}

.c-score {
    color: var(--ink-muted);
}

.c-right {
    display: flex;
}

.mini-btn {
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid var(--line);
    background: var(--primary);
    color: #1c3933;
    cursor: pointer;
}

/* =========================
   GRID COMPACT (MAIN)
========================= */

.grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.compact-card {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: 0.2s;
}

.compact-card:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--line-strong);
}

.cc-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cc-ticker {
    font-weight: 800;
    color: var(--primary);
    font-size: 14px;
}

.cc-badge {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--line);
}

.cc-body {
    font-size: 12px;
    color: var(--ink-soft);
    line-height: 1.5;
}/* =========================
   GRID COMPACT (MAIN)
========================= */

.grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.compact-card {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: 0.2s;
}

.compact-card:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--line-strong);
}

.cc-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cc-ticker {
    font-weight: 800;
    color: var(--primary);
    font-size: 14px;
}

.cc-badge {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--line);
}

.cc-body {
    font-size: 12px;
    color: var(--ink-soft);
    line-height: 1.5;
}

/* =========================
   SCREENER UPGRADE
========================= */

.screener-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.screener-block {
    padding: 16px;
    border-radius: 20px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--line);
    transition: 0.2s;
}

.screener-block:hover {
    background: rgba(255,255,255,0.07);
    border-color: var(--line-strong);
}

.sb-header {
    margin-bottom: 10px;
}

.sb-header h3 {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 4px;
}

.sb-desc {
    font-size: 11px;
    color: var(--ink-muted);
}

/* optional subtle highlight per category */
.screener-block:nth-child(1) {
    border-left: 3px solid var(--success);
}

.screener-block:nth-child(2) {
    border-left: 3px solid var(--primary);
}

.screener-block:nth-child(3) {
    border-left: 3px solid var(--warning);
}

.screener-block:nth-child(4) {
    border-left: 3px solid var(--danger);
}/* =========================
   SCREENER UPGRADE
========================= */

.screener-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.screener-block {
    padding: 16px;
    border-radius: 20px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--line);
    transition: 0.2s;
}

.screener-block:hover {
    background: rgba(255,255,255,0.07);
    border-color: var(--line-strong);
}

.sb-header {
    margin-bottom: 10px;
}

.sb-header h3 {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 4px;
}

.sb-desc {
    font-size: 11px;
    color: var(--ink-muted);
}

@media (max-width: 768px) {
    .screener-block {
        padding: 12px;
        border-radius: 16px;
    }

    .sb-header h3 {
        font-size: 14px;
    }

    .sb-desc {
        font-size: 10px;
    }
}

.mini-item {
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 999px;
}

@media (max-width: 768px) {
    .mini-list {
        gap: 6px;
    }

    .mini-item {
        font-size: 10px;
        padding: 5px 8px;
    }
}

.mini-item {
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 999px;
}

@media (max-width: 768px) {
    .mini-list {
        gap: 6px;
    }

    .mini-item {
        font-size: 10px;
        padding: 5px 8px;
    }
}

/* optional subtle highlight per category */
.screener-block:nth-child(1) {
    border-left: 3px solid var(--success);
}

.screener-block:nth-child(2) {
    border-left: 3px solid var(--primary);
}

.screener-block:nth-child(3) {
    border-left: 3px solid var(--warning);
}

.screener-block:nth-child(4) {
    border-left: 3px solid var(--danger);
}

.go-top-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #1c3933;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 999;
}

.go-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.go-top-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(0,0,0,0.35);
}

/* Skeleton Loading */
.skeleton {
    position: relative;
    overflow: hidden;
    background: rgba(255,255,255,0.05);
}

.skeleton-line {
    height: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0.08) 25%,
        rgba(255,255,255,0.2) 50%,
        rgba(255,255,255,0.08) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
}

.w-40 { width: 40%; }
.w-50 { width: 50%; }
.w-60 { width: 60%; }
.w-80 { width: 80%; }

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}