:root {
    --bg: #080b10;
    --bg-elev: #0e131b;
    --surface: #121821;
    --surface-2: #171e29;
    --line: #232b38;
    --line-strong: #2e3848;
    --text: #f3f5f8;
    --text-soft: #c5cbd6;
    --muted: #8b93a3;
    --accent: #b8956a;
    --accent-2: #d4b48a;
    --up: #3f9d72;
    --down: #c45d5d;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
    --radius: 8px;
    --max: 1180px;
    --nav-h: 68px;
    --font: "IBM Plex Sans", system-ui, sans-serif;
    --serif: "IBM Plex Serif", Georgia, serif;
    --mono: "IBM Plex Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select { font-family: inherit; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

.wrap {
    width: min(var(--max), calc(100% - 48px));
    margin: 0 auto;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-2);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.eyebrow::before {
    content: "";
    width: 18px;
    height: 1px;
    background: var(--accent);
}

h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.03em; }
.serif { font-family: var(--serif); }

.muted { color: var(--muted); }
.soft { color: var(--text-soft); }
.up { color: var(--up); }
.down { color: var(--down); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 4px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn-primary {
    background: var(--accent);
    color: #14110c;
}
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost {
    background: transparent;
    border-color: var(--line-strong);
    color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-2); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    height: var(--nav-h);
    background: rgba(8, 11, 16, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(8px);
}
.term-watch { overflow: auto; }
.nav {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.brand {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 13px;
}
.brand span { letter-spacing: 0.32em; color: var(--accent); font-size: 10px; font-weight: 500; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
    color: var(--text-soft);
}
.nav-links a:hover { color: var(--text); }
.nav-pwa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid var(--accent);
    border-radius: 4px;
    background: transparent;
    color: var(--accent-2);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    white-space: nowrap;
}
.nav-pwa:hover { background: rgba(184, 149, 106, 0.12); color: var(--text); }
.nav-pwa[hidden] { display: none !important; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.hero {
    padding: 72px 0 40px;
    border-bottom: 1px solid var(--line);
}
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 56px;
    align-items: center;
}
.hero h1 {
    font-family: var(--serif);
    font-size: clamp(34px, 4.4vw, 56px);
    line-height: 1.12;
    margin: 16px 0 18px;
    font-weight: 500;
}
.hero p.lead {
    color: var(--text-soft);
    font-size: 17px;
    max-width: 520px;
    margin: 0 0 28px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.board {
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.board-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--up);
    display: inline-block;
    margin-right: 6px;
}
.board-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.8fr 72px;
    gap: 8px;
    align-items: center;
    padding: 11px 16px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}
.board-row:last-child { border-bottom: none; }
.board-row b { font-weight: 600; }
.spark { width: 72px; height: 28px; display: block; }

.ticker-wrap {
    border-bottom: 1px solid var(--line);
    background: #0b0f16;
    overflow: hidden;
}
.ticker {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.ticker::-webkit-scrollbar { display: none; }
.tick {
    flex: 0 0 auto;
    min-width: 210px;
    padding: 14px 20px;
    border-right: 1px solid var(--line);
}
.tick .k { font-size: 11px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.tick .v { margin-top: 4px; display: flex; gap: 10px; align-items: baseline; }
.section {
    padding: 88px 0;
    border-bottom: 1px solid var(--line);
}
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 36px;
}
.section-head h2 {
    font-family: var(--serif);
    font-size: clamp(28px, 3vw, 40px);
    max-width: 640px;
    margin-top: 10px;
}
.note {
    font-size: 12px;
    color: var(--muted);
    max-width: 280px;
}

.tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.tab {
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
}
.tab.is-on { color: var(--text); border-color: var(--accent); }

.cards-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    min-height: 280px;
}
.panel h3 {
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 14px;
}
.eq-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    align-items: center;
}
.eq-row:last-child { border-bottom: none; }
.eq-sym { font-size: 14px; font-weight: 600; }
.eq-name { font-size: 12px; color: var(--muted); }
.eq-px { text-align: right; font-size: 13px; }

.terminal {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 250px;
    grid-template-rows: 1fr 150px;
    gap: 10px;
    min-height: 560px;
}
.term-box {
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.term-chart { grid-column: 2; grid-row: 1; }
.term-side { grid-column: 3; grid-row: 1; }
.term-watch { grid-column: 1; grid-row: 1 / span 2; }
.term-hist { grid-column: 2 / span 2; grid-row: 2; }
.term-h {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.tf { display: flex; gap: 4px; }
.tf button {
    background: transparent;
    border: 1px solid transparent;
    color: var(--muted);
    font-size: 11px;
    padding: 4px 7px;
    cursor: pointer;
}
.tf button.is-on { color: var(--text); border-color: var(--line-strong); }
#candleChart, #volumeChart { width: 100%; display: block; }
#candleChart { height: 280px; }
#volumeChart { height: 72px; }
.watch-item, .hist-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    cursor: pointer;
}
.watch-item.is-on { background: var(--surface-2); }
.side-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.side-px { font-size: 28px; font-weight: 500; }
.dir {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.dir button {
    height: 40px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}
.dir .buy { border-color: rgba(63, 157, 114, 0.45); color: var(--up); }
.dir .sell { border-color: rgba(196, 93, 93, 0.45); color: var(--down); }
.kv { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.hist-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.hist-table th, .hist-table td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line); color: var(--text-soft); }
.hist-table th { color: var(--muted); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; font-size: 10px; }

.research {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.r-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s ease;
}
.r-card:hover { border-color: var(--line-strong); }
.r-card time { font-size: 12px; color: var(--muted); }
.r-card h3 { font-size: 22px; font-family: var(--serif); margin: 12px 0 10px; }
.r-card p { color: var(--text-soft); font-size: 14px; flex: 1; }
.r-card span { font-size: 13px; color: var(--accent-2); }

.port-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 14px;
}
.stat-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}
.stat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
}
.stat .k { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.stat .v { font-size: 22px; margin-top: 8px; }
#donutChart { width: 100%; height: 260px; display: block; }
.legend { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--text-soft); }
.sw { width: 8px; height: 8px; display: inline-block; margin-right: 8px; }

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.feat { padding: 8px 8px 0 0; }
.feat h3 { font-size: 20px; font-family: var(--serif); margin: 10px 0; }
.feat p { color: var(--text-soft); }

.mobile-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 48px;
    align-items: center;
}
.phone {
    width: 280px;
    margin: 0 auto;
    background: #0a0d13;
    border: 1px solid var(--line-strong);
    border-radius: 28px;
    padding: 14px 12px 18px;
    min-height: 540px;
}
.phone-bar { height: 10px; display: flex; justify-content: center; margin-bottom: 12px; }
.phone-bar i { width: 70px; height: 5px; border-radius: 99px; background: #2a3140; display: block; }
.ph-top { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.ph-val { font-size: 26px; margin: 10px 0 4px; }
.ph-list { margin-top: 16px; }
.ph-nav {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    font-size: 10px;
    color: var(--muted);
    text-align: center;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.site-footer {
    padding: 56px 0 28px;
    background: #07090d;
}
.foot-grid {
    display: grid;
    grid-template-columns: 1.2fr repeat(3, 1fr);
    gap: 32px;
}
.site-footer h4 {
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0 0 14px;
    color: var(--text-soft);
}
.site-footer a { display: block; color: var(--muted); font-size: 13px; padding: 4px 0; }
.site-footer a:hover { color: var(--text); }
.foot-legal {
    margin-top: 36px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    font-size: 12px;
    color: var(--muted);
}

.reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.is-in { opacity: 1; transform: none; }

@keyframes flashUp {
    0% { background: rgba(63, 157, 114, 0.28); }
    100% { background: transparent; }
}
@keyframes flashDown {
    0% { background: rgba(196, 93, 93, 0.28); }
    100% { background: transparent; }
}
.flash-up { animation: flashUp 0.7s ease; }
.flash-down { animation: flashDown 0.7s ease; }
.tick, .board-row, .eq-row, .watch-item {
    transition: background 0.2s ease;
}

.nav-open .nav-links,
.nav-open .nav-actions { display: flex; }

@media (max-width: 1100px) {
    .hero-grid, .port-grid, .mobile-grid { grid-template-columns: 1fr; }
    .cards-4, .research, .features, .foot-grid { grid-template-columns: 1fr 1fr; }
    .terminal {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        min-height: 0;
    }
    .term-watch, .term-chart, .term-side, .term-hist { grid-column: 1; grid-row: auto; }
    #candleChart { height: 240px; }
}
@media (max-width: 760px) {
    .wrap { width: min(var(--max), calc(100% - 28px)); }
    .nav-links, .nav-actions { display: none; }
    .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .nav-open .nav-links, .nav-open .nav-actions {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        position: absolute;
        left: 0; right: 0;
        top: var(--nav-h);
        background: #0c1017;
        border-bottom: 1px solid var(--line);
        padding: 16px 24px 20px;
        gap: 12px;
    }
    .cards-4, .research, .features, .stat-row, .foot-grid { grid-template-columns: 1fr; }
    .hero { padding: 40px 0 28px; }
    .section { padding: 56px 0; }
    .phone { width: 100%; max-width: 300px; }
}
