:root {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #fafafa;
    --surface-3: #f4f4f5;
    --text: #111111;
    --text-dim: #6b7280;
    --text-mute: #9ca3af;
    --accent: #111111;
    --accent-warm: #b8860b;
    --positive: #059669;
    --negative: #dc2626;
    --border: #e5e7eb;
    --border-soft: #f1f2f4;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Text",
                 "PingFang TC", "Noto Sans TC", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    min-height: 100vh;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: -0.005em;
}

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

a { color: inherit; }

/* Header */
.site-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border-soft);
    padding: 18px 0;
    position: sticky;
    top: 0;
    z-index: 20;
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.brand {
    color: var(--text);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    letter-spacing: -0.01em;
}
.site-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}
.nav-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.15s;
}
.nav-link:hover { color: var(--text); }
.nav-btn {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    cursor: pointer;
}

/* Auth */
.auth-box {
    max-width: 420px;
    margin: 40px auto;
    padding: 36px 32px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
}
.auth-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.auth-sub {
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 24px;
}
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.auth-form label {
    font-size: 12px;
    color: var(--text-dim);
    font-weight: 500;
    letter-spacing: 0.02em;
}
.auth-form input {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background: var(--surface);
    color: var(--text);
    transition: border-color 0.15s;
}
.auth-form input:focus {
    outline: none;
    border-color: var(--text);
}
.auth-form button { margin-top: 8px; }
.auth-footnote {
    text-align: center;
    margin-top: 16px;
    font-size: 12px;
}
.auth-error {
    padding: 12px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--negative);
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}
.auth-success {
    padding: 16px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: var(--positive);
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
}
.auth-success small { color: #047857; display: block; margin-top: 6px; font-size: 12px; }
.auth-success strong { font-weight: 600; }
.badge {
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    margin-right: 10px;
    letter-spacing: 0.02em;
    border: 1px solid var(--border);
}
.badge.free { color: var(--text-dim); background: #fff; }
.badge.premium { color: #1a1203; background: #fef7e0; border-color: #f0d585; }
.btn-upgrade {
    background: var(--text);
    color: #fff;
    padding: 7px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    transition: opacity 0.15s;
}
.btn-upgrade:hover { opacity: 0.85; }

/* Main */
main { padding: 40px 0 60px; }

/* Hero */
.hero {
    margin-bottom: 36px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border-soft);
}
.hero-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
}
.hero-left h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.025em;
    line-height: 1.15;
}
.hero-sub {
    color: var(--text-dim);
    font-size: 13px;
}
.hero-stats {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}
.hero-stat {
    text-align: left;
    min-width: 68px;
    position: relative;
}
.hero-stat .emoji {
    display: block;
    font-size: 18px;
    margin-bottom: 4px;
    line-height: 1;
}
.hero-stat .num {
    display: block;
    font-size: 28px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.025em;
    line-height: 1.1;
}
.hero-stat .num small { font-size: 14px; margin-left: 1px; color: var(--text-dim); font-weight: 400; }
.hero-stat .lbl {
    display: block;
    font-size: 11px;
    color: var(--text-mute);
    margin-top: 6px;
    letter-spacing: 0.02em;
}
.hero-stat.positive-bg .num { color: var(--positive); }
.hero-stat.negative-bg .num { color: var(--negative); }
.hero-stat.accent-bg .num { color: var(--accent-warm); }
.sample-warn { color: #d97706; }

.disclaimer-banner {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #78350f;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 12px;
    line-height: 1.6;
}
.disclaimer-banner strong { color: #78350f; }

/* Market bar (compact one-liner per index) */
.market-bar {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}
.market-tile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    border-left: 3px solid var(--border);
    font-size: 14px;
    flex-wrap: wrap;
}
.market-tile.market-bull { border-left-color: var(--positive); }
.market-tile.market-bear { border-left-color: var(--negative); }
.market-tile.market-neutral { border-left-color: var(--accent-warm); }
.market-name { font-weight: 500; }
.market-close {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin-left: auto;
}
.market-change { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 13px; }
.market-label {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
}
.market-label.market-bull { background: #ecfdf5; color: var(--positive); border: 1px solid #a7f3d0; }
.market-label.market-bear { background: #fef2f2; color: var(--negative); border: 1px solid #fecaca; }
.market-label.market-neutral { background: #fef7e0; color: var(--accent-warm); border: 1px solid #f0d585; }
@media (max-width: 768px) {
    .market-tile { font-size: 13px; padding: 8px 12px; gap: 8px; }
}

/* Signals page head */
.signals-head {
    margin-bottom: 20px;
}
.page-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}
.page-sub {
    font-size: 13px;
}

/* Filters — dropdown */
.filters-wrap {
    margin-bottom: 24px;
}
.filters-form {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr auto;
    gap: 10px;
    align-items: end;
}
.filter-select-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.filter-input {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.15s;
    width: 100%;
}
.filter-input:focus { outline: none; border-color: var(--text); }
.filter-btn {
    padding: 12px 20px;
    border-radius: 8px;
    background: var(--text);
    color: #fff;
    border: none;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    height: 46px;
    transition: opacity 0.15s;
}
.filter-btn:hover { opacity: 0.85; }
.filters-result {
    margin-top: 12px;
    padding: 10px 12px;
    background: var(--surface-2);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-dim);
}
.filters-result b { color: var(--text); font-weight: 600; }
.filters-result a { color: var(--text); text-decoration: underline; margin-left: 4px; }

.filter-chipbar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-dim);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.15s;
}
.filter-chip:hover { border-color: var(--text-dim); color: var(--text); }
.filter-chip.active {
    background: var(--text);
    color: #fff;
    border-color: var(--text);
    font-weight: 500;
}
.filter-chip.profit-chip.active {
    background: var(--positive);
    border-color: var(--positive);
}
.filter-chip.loss-chip.active {
    background: var(--negative);
    border-color: var(--negative);
}

/* Force card view on history even on desktop */
.signals-cards { display: flex !important; flex-direction: column; gap: 12px; }

/* Custom filter form */
.custom-form {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 24px;
}
.custom-section {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-soft);
}
.custom-section:last-of-type { border-bottom: none; }
.custom-label {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 10px;
    color: var(--text);
}
.checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.checkbox-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s;
}
.checkbox-chip input { margin: 0; cursor: pointer; }
.checkbox-chip:hover { border-color: var(--text-dim); }
.checkbox-chip:has(input:checked) {
    background: var(--text);
    color: #fff;
    border-color: var(--text);
}
.input-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.input-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.input-lbl {
    font-size: 12px;
    color: var(--text-dim);
}
.input-wrap input {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: var(--surface);
    color: var(--text);
    width: 100%;
}
.input-wrap input:focus { outline: none; border-color: var(--text); }
.input-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}
.input-inline .unit {
    font-size: 13px;
    color: var(--text-dim);
}
.custom-actions {
    display: flex;
    gap: 10px;
    padding-top: 18px;
    flex-wrap: wrap;
}
@media (max-width: 768px) {
    .custom-form { padding: 18px; }
    .input-grid { grid-template-columns: 1fr; }
    .custom-actions { flex-direction: column; }
    .custom-actions .btn-primary, .custom-actions .btn-secondary { width: 100%; }
}
.filter-lbl {
    font-size: 11px;
    color: var(--text-mute);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 500;
}
.filter-select {
    appearance: none;
    -webkit-appearance: none;
    padding: 12px 40px 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s;

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}
.filter-select:hover { border-color: var(--text-dim); }
.filter-select:focus {
    outline: none;
    border-color: var(--text);
}

/* Desktop Table */
.signals-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.signals-table th {
    padding: 10px 12px;
    font-weight: 500;
    color: var(--text-mute);
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.signals-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border-soft);
    vertical-align: middle;
}
.signals-table tbody tr:hover { background: var(--surface-2); cursor: pointer; }
.signals-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.stock-cell { display: flex; flex-direction: column; gap: 2px; }
.stock-cell .code {
    font-family: "SF Mono", ui-monospace, "Menlo", monospace;
    color: var(--text);
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
}
.stock-cell .code[href]:hover { color: var(--accent-warm); }
.stock-cell .name { font-size: 13px; color: var(--text-dim); }

.strategy-chip {
    display: inline-block;
    padding: 2px 8px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 11px;
    color: var(--text-dim);
    white-space: nowrap;
    font-weight: 500;
}

.dim { color: var(--text-dim); }
.dim-small { font-size: 11px; color: var(--text-mute); }
.positive { color: var(--positive); }
.negative { color: var(--negative); }

.dual { display: flex; flex-direction: column; gap: 1px; }

.chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid;
}
.chip.open { color: #0369a1; border-color: #bae6fd; background: #f0f9ff; }
.chip.profit { color: var(--positive); border-color: #a7f3d0; background: #ecfdf5; }
.chip.loss { color: var(--negative); border-color: #fecaca; background: #fef2f2; }

.tag {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    background: var(--surface-3);
    color: var(--text-dim);
    font-size: 11px;
    margin-right: 3px;
    margin-bottom: 3px;
}
.tags-cell { max-width: 160px; }

/* Mobile cards */
.signal-card-link { text-decoration: none; color: inherit; display: block; }
.signals-cards {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.signal-card {
    background: var(--surface);
    border-bottom: 1px solid var(--border-soft);
    padding: 18px 0;
    transition: background 0.15s;
}
.signal-card-link:hover .signal-card { background: var(--surface-2); }

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}
.code-block .code {
    font-family: "SF Mono", ui-monospace, "Menlo", monospace;
    color: var(--text);
    font-weight: 600;
    font-size: 18px;
    line-height: 1.1;
}
.code-block .name {
    font-size: 14px;
    color: var(--text-dim);
    margin-top: 3px;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    font-size: 12px;
    flex-wrap: wrap;
}

.price-row {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 10px;
}
.price-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}
.price-block .lbl {
    font-size: 10px;
    color: var(--text-mute);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.price-block .val {
    font-size: 20px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.015em;
}
.arrow {
    color: var(--text-mute);
    font-size: 14px;
    padding-bottom: 2px;
}

.card-foot {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-mute);
    margin-bottom: 8px;
}
.card-foot b { color: var(--text); font-weight: 600; margin-left: 4px; }

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 8px;
}

/* Locked */
.locked {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    padding: 20px;
    background: var(--surface-2);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
}
.locked-icon { font-size: 22px; opacity: 0.7; }
.locked-text { flex: 1; font-size: 13px; }
.locked-text strong { color: var(--text); font-weight: 600; }
.locked-sub { font-size: 12px; color: var(--text-dim); margin-top: 3px; }

.empty {
    text-align: center;
    color: var(--text-dim);
    padding: 80px 20px;
    font-size: 14px;
}

/* Detail page */
.detail-nav {
    margin-bottom: 24px;
}
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s;
}
.back-btn:hover {
    background: var(--surface-3);
    border-color: var(--text-dim);
}

.detail-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    padding-bottom: 28px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border-soft);
    flex-wrap: wrap;
}
.detail-code {
    font-family: "SF Mono", ui-monospace, "Menlo", monospace;
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.02em;
    color: var(--text-dim);
}
.detail-name {
    font-size: 32px;
    font-weight: 700;
    margin: 4px 0 14px;
    letter-spacing: -0.025em;
    line-height: 1.15;
}
.detail-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
}
.big-pnl {
    font-size: 44px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    margin-bottom: 6px;
    letter-spacing: -0.03em;
}

.panel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-bottom: 28px;
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
}
.panel {
    padding: 20px 0;
    margin-bottom: 24px;
}
.panel-grid .panel {
    padding: 24px 24px;
    margin-bottom: 0;
    border: none;
}
.panel-grid .panel:first-child {
    border-right: 1px solid var(--border-soft);
    padding-left: 0;
}
.panel-grid .panel:last-child { padding-right: 0; }
.panel-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 14px;
    color: var(--text);
    letter-spacing: -0.005em;
}
.levels { display: flex; flex-direction: column; }
.level-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 9px 0;
    border-bottom: 1px solid var(--border-soft);
    font-size: 13px;
}
.level-row:last-child { border-bottom: none; }
.level-row .val {
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    font-size: 14px;
}
.level-row .val small {
    margin-left: 6px;
    font-weight: 400;
    color: var(--text-mute);
}
.val.accent { color: var(--accent-warm); font-weight: 600; }
.val.small { font-size: 12px; font-weight: 400; }

.strategy-summary {
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.75;
}

.premium-panel {
    padding: 24px 0;
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
    margin-bottom: 28px;
}
.ai-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}
.ai-cell {
    padding: 14px 20px;
    border-right: 1px solid var(--border-soft);
}
.ai-cell:last-child { border-right: none; }
.ai-cell:first-child { padding-left: 0; }
.ai-lbl {
    font-size: 11px;
    color: var(--text-mute);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.ai-score {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 3px;
    letter-spacing: -0.01em;
}
.ai-score.accent { color: var(--accent-warm); }

.locked-panel {
    padding: 20px;
    background: var(--surface-2);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    margin-bottom: 28px;
}
.locked-inner {
    display: flex;
    align-items: center;
    gap: 16px;
}
.locked-inner .locked-text { flex: 1; }

.chart-panel {
    padding: 0;
    overflow: hidden;
}
.chart-summary {
    padding: 16px 20px;
    cursor: pointer;
    list-style: none;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background 0.15s;
}
.chart-summary::-webkit-details-marker { display: none; }
.chart-summary::after {
    content: '▼';
    color: var(--text-mute);
    font-size: 12px;
    transition: transform 0.2s;
    margin-left: 10px;
}
.chart-panel[open] .chart-summary::after { transform: rotate(180deg); }
.chart-panel[open] .chart-summary { border-bottom: 1px solid var(--border-soft); }
.chart-summary:hover { background: var(--surface-2); }
.chart-panel[open] .chart-hint { display: none; }
.chart-hint { font-size: 12px; font-weight: 400; }

.chart-inner {
    padding: 14px 20px 18px;
}
.chart-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.chart-periods, .chart-sizes, .chart-intervals {
    display: inline-flex;
    gap: 4px;
}
.period-btn.active,
.interval-btn.active,
.size-btn.active {
    background: var(--text);
    color: #fff;
    border-color: var(--text);
}
.chart-status {
    font-size: 12px;
    margin-bottom: 8px;
    color: var(--text-dim);
}
.kline-chart {
    width: 100%;
    height: 460px;
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
}
@media (max-width: 768px) {
    .kline-chart { height: 360px; }
}
.fund-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.fund-cell {
    background: var(--surface-2);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.fund-cell-wide { grid-column: span 3; }
.fund-lbl {
    font-size: 11px;
    color: var(--text-mute);
    letter-spacing: 0.04em;
}
.fund-val {
    font-size: 17px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.fund-meta {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border-soft);
    font-size: 13px;
}
@media (max-width: 768px) {
    .fund-grid { grid-template-columns: repeat(2, 1fr); }
    .fund-cell-wide { grid-column: span 2; }
    .fund-val { font-size: 15px; }
}

.ma-legend {
    display: inline-flex;
    gap: 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.ma-chip {
    padding: 2px 8px;
    background: var(--surface-2);
    border-radius: 4px;
}

.chart-links {
    padding: 16px 20px 20px;
}
.chart-link-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.chart-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    background: var(--surface);
    transition: all 0.15s;
}
.chart-link:hover { border-color: var(--text-dim); background: var(--surface-2); }
.chart-link-emoji {
    font-size: 22px;
    line-height: 1;
}
.chart-link-name { font-weight: 600; font-size: 14px; }
.chart-link-sub { font-size: 11px; margin-top: 2px; }
@media (max-width: 768px) {
    .chart-link-grid { grid-template-columns: 1fr; }
}

.chart-actions-row {
    padding: 12px 20px 0;
    display: flex;
    justify-content: flex-end;
}
.chart-actions {
    display: inline-flex;
    gap: 4px;
}
.chart-panel[open] .tradingview-wrap,
.chart-panel[open] .chart-note {
    margin: 12px 20px;
}
.chart-panel[open] .chart-note { margin-top: 4px; }
.chart-btn {
    padding: 4px 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-dim);
    border-radius: 6px;
    font-size: 12px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.chart-btn:hover { border-color: var(--text-dim); color: var(--text); }

.tradingview-wrap {
    width: 100%;
    height: 460px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    background: #fff;
    transition: height 0.2s;
}
.tradingview-wrap.size-small { height: 320px; }
.tradingview-wrap.size-medium { height: 520px; }
.tradingview-wrap.size-large { height: 760px; }
.tradingview-wrap:fullscreen { height: 100vh; border-radius: 0; border: none; }
.tradingview-wrap:-webkit-full-screen { height: 100vh; border-radius: 0; border: none; }
.tradingview-chart {
    width: 100%;
    height: 100%;
}
.chart-note {
    font-size: 11px;
    margin-top: 8px;
}
@media (max-width: 768px) {
    .tradingview-wrap { height: 420px; }
    .tradingview-wrap.size-small { height: 300px; }
    .tradingview-wrap.size-medium { height: 460px; }
    .tradingview-wrap.size-large { height: 640px; }
    .chart-actions { width: 100%; justify-content: space-between; margin-top: 6px; }
    .chart-btn { flex: 1; }
}

.others {
    display: flex;
    flex-direction: column;
}
.other-row {
    display: grid;
    grid-template-columns: 100px auto 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-soft);
    font-size: 13px;
    text-decoration: none;
    color: var(--text);
}
.other-row:last-child { border-bottom: none; }
.other-row:hover { color: var(--accent-warm); }
.other-status { text-align: right; font-size: 12px; }

.disclaimer {
    margin: 40px 0 0;
    text-align: center;
    color: var(--text-mute);
    font-size: 11px;
}

/* Landing page */
.landing-hero {
    padding: 60px 0 72px;
    text-align: center;
    border-bottom: 1px solid var(--border-soft);
    margin-bottom: 60px;
}
.landing-hero-badge {
    display: inline-block;
    padding: 6px 14px;
    background: #fef7e0;
    border: 1px solid #f0d585;
    color: #7c5a00;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 24px;
    letter-spacing: -0.005em;
}
.landing-title {
    font-size: 52px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.035em;
    margin-bottom: 20px;
}
.landing-title .highlight {
    background: linear-gradient(135deg, #d4a017, #b8860b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.landing-sub {
    font-size: 17px;
    color: var(--text-dim);
    margin-bottom: 32px;
    line-height: 1.7;
}
.landing-cta {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 56px;
    flex-wrap: wrap;
}
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 28px;
    background: var(--text);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.15s;
    border: 1px solid var(--text);
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-primary.large { padding: 16px 32px; font-size: 16px; }
.btn-primary.full { width: 100%; padding: 12px 20px; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 28px;
    background: var(--surface);
    color: var(--text);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border: 1px solid var(--border);
    transition: all 0.15s;
}
.btn-secondary:hover { background: var(--surface-3); }
.btn-secondary.full { width: 100%; padding: 12px 20px; }

.landing-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    max-width: 780px;
    margin: 0 auto;
    background: var(--border-soft);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    overflow: hidden;
}
.kpi {
    background: var(--surface);
    padding: 20px 16px;
    text-align: center;
}
.kpi-num {
    font-size: 32px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.025em;
    line-height: 1.1;
}
.kpi-num small { font-size: 16px; font-weight: 500; margin-left: 1px; color: var(--text-dim); }
.kpi-lbl {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 6px;
}
.kpi-accent .kpi-num { color: var(--accent-warm); }

.landing-section {
    padding: 40px 0 60px;
}
.landing-section-head {
    text-align: center;
    margin-bottom: 36px;
}
.landing-section-head h2 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 8px;
    line-height: 1.2;
}

.strategy-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.strategy-card {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 22px 18px;
    transition: all 0.15s;
}
.strategy-card:hover { border-color: var(--border); transform: translateY(-2px); }
.strategy-emoji {
    font-size: 28px;
    margin-bottom: 10px;
    line-height: 1;
}
.strategy-name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 8px;
}
.strategy-desc {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 14px;
    min-height: 48px;
}
.strategy-count {
    font-size: 12px;
    color: var(--text-mute);
    padding-top: 10px;
    border-top: 1px solid var(--border-soft);
}
.strategy-count b { color: var(--text); font-weight: 600; }

.pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 720px;
    margin: 0 auto;
}
.pricing-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px 26px;
}
.pricing-card.pricing-featured {
    border: 2px solid var(--accent-warm);
    position: relative;
    box-shadow: 0 4px 24px rgba(184, 134, 11, 0.08);
}
.pricing-tier {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-dim);
    margin-bottom: 10px;
}
.pricing-featured .pricing-tier { color: var(--accent-warm); }
.pricing-price {
    font-size: 40px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.025em;
    margin-bottom: 20px;
    line-height: 1;
}
.pricing-price span { font-size: 14px; color: var(--text-dim); font-weight: 500; margin-left: 2px; }
.pricing-features {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
}
.pricing-features li {
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--border-soft);
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-features li.muted { color: var(--text-mute); }
.pricing-note {
    text-align: center;
    margin-top: 16px;
    font-size: 12px;
}

.faq-list {
    max-width: 680px;
    margin: 0 auto;
}
.faq-item {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    margin-bottom: 10px;
    padding: 4px 18px;
}
.faq-item summary {
    cursor: pointer;
    font-weight: 500;
    padding: 14px 0;
    font-size: 15px;
    list-style: none;
    position: relative;
    padding-right: 30px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 12px;
    font-size: 20px;
    color: var(--text-mute);
    transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
    padding: 0 0 16px;
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.7;
}

.landing-cta-section {
    text-align: center;
    padding: 60px 0 40px;
    border-top: 1px solid var(--border-soft);
    margin-top: 40px;
}
.landing-cta-section h2 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 24px;
}

/* Admin */
.admin-head {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-soft);
}
.admin-head h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}
.admin-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 680px;
}
.admin-table th {
    padding: 10px 12px;
    font-weight: 500;
    color: var(--text-mute);
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.admin-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-soft);
    vertical-align: middle;
}
.admin-table .email-cell {
    font-family: "SF Mono", ui-monospace, monospace;
    font-size: 12px;
}
.admin-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.admin-btn {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}
.admin-btn:hover { border-color: var(--text-dim); }
.admin-btn.up {
    background: var(--text);
    color: #fff;
    border-color: var(--text);
}
.admin-btn.up:hover { opacity: 0.85; }
.admin-btn.ext {
    background: #fef7e0;
    border-color: #f0d585;
    color: #7c5a00;
}
.admin-btn.down {
    color: var(--negative);
    border-color: #fecaca;
}

/* Claude AI analysis */
.claude-panel { background: linear-gradient(135deg, rgba(244, 185, 66, 0.08), rgba(244, 185, 66, 0.01)); }
.claude-out { padding-top: 4px; }
.claude-body h2, .claude-body h3 {
    margin: 16px 0 8px;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.claude-body h2 { font-size: 18px; }
.claude-body h3 { font-size: 15px; color: var(--accent-warm); }
.claude-body p { margin: 10px 0; font-size: 14px; line-height: 1.75; }
.claude-body ul { margin: 10px 0; padding-left: 22px; }
.claude-body li { font-size: 14px; line-height: 1.7; margin-bottom: 6px; }
.claude-body strong { color: var(--text); font-weight: 600; }
.claude-error {
    padding: 12px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--negative);
    border-radius: 8px;
    font-size: 13px;
}

/* Footer */
.site-footer {
    margin-top: 60px;
    padding: 24px 0 40px;
    border-top: 1px solid var(--border-soft);
    color: var(--text-mute);
    text-align: center;
    font-size: 12px;
}

/* Responsive */
.mobile-only { display: none; }
.desktop-only { display: table; }

@media (max-width: 768px) {
    .container { padding: 0 20px; }
    main { padding: 24px 0 40px; }
    .hero { padding-bottom: 24px; margin-bottom: 28px; }
    .hero-inner { flex-direction: column; align-items: stretch; gap: 20px; }
    .hero-left h1 { font-size: 22px; }
    .hero-sub { font-size: 12px; }
    .hero-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 16px 20px;
    }
    .hero-stat { min-width: 0; }
    .hero-stat .num { font-size: 20px; }
    .hero-stat .lbl { font-size: 10px; }
    .mobile-only { display: flex; }
    .desktop-only { display: none; }
    .locked { flex-direction: column; text-align: center; gap: 10px; }
    /* Filters form mobile */
    .filters-form {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .filter-btn { width: 100%; }
    /* Header mobile */
    .brand { font-size: 14px; }
    .site-nav { gap: 10px; }
    .nav-link { font-size: 12px; }
    .btn-upgrade { padding: 6px 12px; font-size: 12px; width: auto; }
    .badge { font-size: 10px; padding: 2px 7px; margin-right: 4px; }
    /* Landing mobile */
    .landing-hero { padding: 40px 0 48px; margin-bottom: 40px; }
    .landing-title { font-size: 36px; }
    .landing-sub { font-size: 15px; }
    .landing-sub br { display: none; }
    .landing-cta { flex-direction: column; }
    .btn-primary, .btn-secondary { width: 100%; }
    .landing-kpis { grid-template-columns: repeat(2, 1fr); }
    .landing-section { padding: 28px 0 40px; }
    .landing-section-head h2 { font-size: 22px; }
    .strategy-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .strategy-card { padding: 18px 14px; }
    .strategy-desc { min-height: auto; }
    .pricing-grid { grid-template-columns: 1fr; }
    .landing-cta-section { padding: 40px 0 20px; }
    .landing-cta-section h2 { font-size: 22px; }
    .panel-grid { grid-template-columns: 1fr; }
    .panel-grid .panel:first-child {
        border-right: none;
        border-bottom: 1px solid var(--border-soft);
        padding: 20px 0;
    }
    .panel-grid .panel:last-child { padding: 20px 0 0; }
    .detail-head { padding-bottom: 20px; margin-bottom: 20px; }
    .detail-code { font-size: 13px; }
    .detail-name { font-size: 22px; }
    .big-pnl { font-size: 30px; }
    .ai-grid { grid-template-columns: 1fr; }
    .ai-cell {
        padding: 14px 0;
        border-right: none;
        border-bottom: 1px solid var(--border-soft);
    }
    .ai-cell:last-child { border-bottom: none; }
    .other-row { grid-template-columns: 1fr; gap: 4px; }
    .locked-inner { flex-direction: column; text-align: center; }
}
