:root {
  color-scheme: dark;
  --bg: #07101c;
  --bg-soft: #0b1727;
  --panel: rgba(14, 27, 45, 0.82);
  --panel-solid: #0f1d30;
  --panel-light: #14243a;
  --border: rgba(148, 163, 184, 0.15);
  --border-strong: rgba(148, 163, 184, 0.27);
  --text: #f8fafc;
  --muted: #8fa2bb;
  --primary: #2dd4bf;
  --primary-strong: #14b8a6;
  --primary-soft: rgba(45, 212, 191, 0.13);
  --blue: #38bdf8;
  --positive: #4ade80;
  --negative: #fb7185;
  --warning: #fbbf24;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
  --radius: 20px;
  --shell: min(1180px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 76% 8%, rgba(45, 212, 191, 0.10), transparent 30%),
    radial-gradient(circle at 10% 24%, rgba(56, 189, 248, 0.08), transparent 28%),
    var(--bg);
  color: var(--text);
}
body.dashboard-open { background: #07101c; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
.shell { width: var(--shell); margin-inline: auto; }
.muted { color: var(--muted); }

.demo-ribbon {
  position: relative;
  z-index: 100;
  padding: 7px 16px;
  background: linear-gradient(90deg, #7c2d12, #9a3412, #7c2d12);
  color: #ffedd5;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .09em;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  padding: 16px max(20px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--border);
  background: rgba(7, 16, 28, 0.82);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 21px; font-weight: 850; letter-spacing: -.04em; }
.brand > span:nth-child(2) > span, .brand > span:not(.brand-mark) span { color: var(--primary); }
.brand small { margin-left: 2px; padding: 3px 6px; border: 1px solid rgba(45,212,191,.28); border-radius: 5px; color: var(--primary); font-size: 8px; letter-spacing: .12em; }
.brand-mark { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 10px; background: linear-gradient(145deg, var(--primary), #0f766e); color: #021714; font-weight: 950; box-shadow: 0 0 28px rgba(45,212,191,.22); }
.main-nav { display: flex; gap: 32px; color: #b9c6d8; font-size: 14px; }
.main-nav a:hover { color: var(--text); }
.header-actions { justify-self: end; display: flex; gap: 10px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 750;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button-primary { background: linear-gradient(135deg, #35e0cc, #13b9a7); color: #031a17; box-shadow: 0 12px 30px rgba(20,184,166,.16); }
.button-primary:hover { background: linear-gradient(135deg, #5eead4, #2dd4bf); }
.button-ghost { border-color: var(--border-strong); background: rgba(255,255,255,.025); color: #d7e0eb; }
.button-ghost:hover { border-color: rgba(45,212,191,.35); background: var(--primary-soft); }
.button-large { min-height: 52px; padding-inline: 23px; }
.button-disabled { border-color: var(--border); background: rgba(255,255,255,.03); color: #718197; cursor: not-allowed; }
.full-width { width: 100%; }

.view { display: none; }
.view.is-active { display: block; }
.hero { display: grid; grid-template-columns: 1.08fr .92fr; gap: 70px; align-items: center; min-height: 660px; padding-block: 75px 85px; }
.hero-copy h1 { max-width: 720px; margin: 15px 0 20px; font-size: clamp(44px, 6vw, 74px); line-height: .99; letter-spacing: -.065em; }
.hero-copy h1 span { color: var(--primary); }
.hero-copy > p { max-width: 650px; margin: 0; color: #9eb0c6; font-size: 18px; line-height: 1.7; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--primary); font-size: 11px; font-weight: 850; letter-spacing: .13em; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--positive); box-shadow: 0 0 0 5px rgba(74,222,128,.09), 0 0 14px rgba(74,222,128,.7); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 28px; color: #7890ab; font-size: 12px; }
.glass-card { border: 1px solid var(--border); border-radius: 24px; background: linear-gradient(145deg, rgba(17,33,53,.88), rgba(10,22,38,.72)); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.hero-panel { position: relative; padding: 25px; }
.hero-panel::before { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; background: linear-gradient(145deg, rgba(45,212,191,.2), transparent 40%, rgba(56,189,248,.1)); filter: blur(20px); }
.panel-head, .panel-foot, .card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.panel-head > div, .card-head > div { display: grid; gap: 5px; }
.status-badge { display: inline-flex; align-items: center; min-height: 26px; padding: 0 9px; border: 1px solid rgba(45,212,191,.22); border-radius: 999px; background: rgba(45,212,191,.09); color: #78f4e5; font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.status-badge.warning { border-color: rgba(251,191,36,.26); background: rgba(251,191,36,.08); color: #fde68a; }
.mini-market-list { display: grid; gap: 7px; margin-block: 23px; }
.mini-market-item { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 16px; padding: 14px; border: 1px solid rgba(148,163,184,.09); border-radius: 13px; background: rgba(255,255,255,.018); }
.coin-cell { display: flex; align-items: center; gap: 11px; }
.coin-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #16263b; color: #e2e8f0; font-size: 12px; font-weight: 900; }
.coin-meta { display: grid; gap: 2px; }
.coin-meta strong { font-size: 14px; }
.coin-meta small { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.coin-price { font-size: 13px; font-weight: 800; white-space: nowrap; }
.change { min-width: 65px; text-align: right; font-size: 12px; font-weight: 800; }
.positive { color: var(--positive); }
.negative { color: var(--negative); }
.panel-foot { padding-top: 18px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.panel-foot strong { color: #cad5e3; }

.market-section, .feature-section { padding-block: 85px; }
.market-section { border-top: 1px solid var(--border); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.section-heading h2 { margin: 8px 0 0; font-size: clamp(30px, 4vw, 45px); letter-spacing: -.045em; }
.section-heading p { max-width: 630px; color: var(--muted); line-height: 1.7; }
.section-heading.centered { justify-content: center; text-align: center; }
.market-table-card, .dashboard-card { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: rgba(13,27,45,.7); box-shadow: 0 18px 55px rgba(0,0,0,.15); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 15px 18px; background: rgba(255,255,255,.018); color: #6f839d; text-align: left; font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
td { padding: 17px 18px; border-top: 1px solid rgba(148,163,184,.08); color: #cbd5e1; font-size: 13px; white-space: nowrap; }
tbody tr:hover { background: rgba(255,255,255,.015); }
.sparkline { width: 110px; height: 34px; overflow: visible; }
.trade-button { min-height: 34px; padding: 0 13px; border: 1px solid rgba(45,212,191,.2); border-radius: 8px; background: rgba(45,212,191,.07); color: var(--primary); font-size: 11px; font-weight: 800; cursor: pointer; }
.trade-button:hover { background: rgba(45,212,191,.13); }
.market-message { padding: 13px 18px; border-top: 1px solid var(--border); color: #fcd34d; font-size: 12px; }

.feature-section { background: linear-gradient(180deg, transparent, rgba(12,24,40,.5), transparent); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-card { padding: 26px; border: 1px solid var(--border); border-radius: 18px; background: rgba(13,27,45,.52); }
.feature-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 38px; border: 1px solid rgba(45,212,191,.23); border-radius: 12px; background: rgba(45,212,191,.08); color: var(--primary); font-size: 19px; }
.feature-card h3 { margin: 0 0 10px; font-size: 19px; }
.feature-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.cta-section { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-block: 25px 95px; padding: 35px; border: 1px solid rgba(45,212,191,.18); border-radius: 24px; background: linear-gradient(125deg, rgba(45,212,191,.12), rgba(56,189,248,.04)); }
.cta-section h2 { max-width: 720px; margin: 8px 0 0; font-size: clamp(26px, 4vw, 41px); letter-spacing: -.045em; }
.site-footer { border-top: 1px solid var(--border); background: rgba(4,10,18,.6); }
.site-footer .shell { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 110px; color: #6f839d; font-size: 11px; }
.footer-brand { font-size: 17px; color: var(--text); }
.footer-brand .brand-mark { width: 27px; height: 27px; border-radius: 8px; }

.login-dialog { width: min(480px, calc(100% - 30px)); padding: 0; border: 1px solid var(--border-strong); border-radius: 22px; background: #0c192a; color: var(--text); box-shadow: 0 35px 100px rgba(0,0,0,.6); }
.login-dialog::backdrop { background: rgba(1,7,14,.78); backdrop-filter: blur(8px); }
.login-dialog form { position: relative; padding: 33px; }
.dialog-close { position: absolute; top: 15px; right: 15px; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 9px; background: rgba(255,255,255,.03); color: #a9b8ca; cursor: pointer; font-size: 22px; }
.login-brand { margin-bottom: 32px; }
.login-dialog h2 { margin: 9px 0 8px; font-size: 29px; letter-spacing: -.04em; }
.login-dialog p { margin: 0 0 25px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.login-dialog label { display: grid; gap: 8px; margin-top: 15px; color: #b9c6d8; font-size: 12px; font-weight: 750; }
.login-dialog input { width: 100%; height: 50px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 11px; outline: 0; background: #081423; color: var(--text); }
.login-dialog input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(45,212,191,.09); }
.demo-credentials { display: grid; gap: 4px; margin: 18px 0; padding: 13px; border: 1px dashed rgba(45,212,191,.25); border-radius: 10px; background: rgba(45,212,191,.055); color: #89a0ba; font-size: 11px; }
.demo-credentials strong { color: #d9fdf8; }
.form-error { margin: 0 0 14px; color: var(--negative); font-size: 12px; }
.legal-note { display: block; margin-top: 13px; color: #657991; text-align: center; }

/* Dashboard */
.dashboard-view.is-active { display: grid; grid-template-columns: 245px 1fr; min-height: calc(100vh - 29px); }
.dashboard-view + .site-footer, body.dashboard-open .site-footer, body.dashboard-open .site-header { display: none; }
.sidebar { position: sticky; top: 29px; align-self: start; display: flex; flex-direction: column; min-height: calc(100vh - 29px); padding: 26px 18px; border-right: 1px solid var(--border); background: #081423; }
.dashboard-brand { padding: 0 9px 24px; }
.side-nav { display: grid; gap: 5px; margin-top: 15px; }
.side-link { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 45px; padding: 0 13px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #8497af; text-align: left; cursor: pointer; font-size: 13px; font-weight: 700; }
.side-link:hover, .side-link.is-active { border-color: rgba(45,212,191,.12); background: rgba(45,212,191,.075); color: #dffdf9; }
.side-link span { width: 20px; text-align: center; color: var(--primary); }
.sidebar-warning { margin-top: auto; padding: 14px; border: 1px solid rgba(251,191,36,.14); border-radius: 12px; background: rgba(251,191,36,.045); }
.sidebar-warning strong { color: #fde68a; font-size: 12px; }
.sidebar-warning p { margin: 6px 0 0; color: #7f8fa5; font-size: 10px; line-height: 1.5; }
.logout { margin-top: 8px; }
.dashboard-main { min-width: 0; padding: 28px 34px 55px; }
.dashboard-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.dashboard-header h1 { margin: 2px 0 0; font-size: 29px; letter-spacing: -.04em; }
.dashboard-header > div:first-child { display: grid; gap: 2px; }
.user-chip { display: flex; align-items: center; gap: 11px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,.02); }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(45,212,191,.12); color: var(--primary); font-size: 12px; font-weight: 900; }
.user-chip div { display: grid; gap: 2px; }
.user-chip strong { font-size: 12px; }
.user-chip small { color: #647990; font-size: 9px; }
.dashboard-notice { margin-bottom: 17px; padding: 11px 15px; border: 1px solid rgba(251,191,36,.18); border-radius: 10px; background: rgba(251,191,36,.06); color: #a99a70; font-size: 10px; letter-spacing: .035em; }
.dashboard-notice strong { color: #fde68a; }
.balance-hero { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 28px; border: 1px solid rgba(45,212,191,.18); border-radius: 20px; background: radial-gradient(circle at 15% 0, rgba(45,212,191,.10), transparent 44%), #0d1b2d; }
.balance-line { display: flex; align-items: center; gap: 14px; margin-top: 5px; }
.balance-line strong { font-size: clamp(35px, 5vw, 53px); letter-spacing: -.06em; }
.balance-line span { padding: 5px 8px; border-radius: 7px; background: rgba(251,113,133,.09); font-size: 11px; font-weight: 800; }
.balance-hero p { margin: 5px 0 0; color: #70849c; font-size: 11px; }
.balance-actions { display: flex; gap: 9px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-block: 16px; }
.metric-card { display: grid; gap: 8px; min-width: 0; padding: 18px; border: 1px solid var(--border); border-radius: 15px; background: rgba(13,27,45,.68); }
.metric-card span { color: #8294aa; font-size: 10px; font-weight: 700; }
.metric-card strong { overflow: hidden; font-size: 21px; letter-spacing: -.035em; text-overflow: ellipsis; }
.metric-card small { color: #5f748d; font-size: 9px; }
.danger-card strong { color: var(--negative); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, .75fr); gap: 16px; margin-bottom: 16px; }
.dashboard-card { padding: 21px; }
.dashboard-card h2 { margin: 0; font-size: 17px; }
.dashboard-card select { min-height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: #0a1727; color: #7388a0; font-size: 10px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 22px; color: #71849b; font-size: 9px; }
.chart-legend span { display: flex; align-items: center; gap: 6px; }
.chart-legend i { width: 8px; height: 8px; border-radius: 50%; }
.legend-invested { background: #38bdf8; }
.legend-current { background: #fb7185; }
.chart-wrap { width: 100%; margin-top: 8px; }
.chart-wrap svg { display: block; width: 100%; height: auto; }
.donut-wrap { display: grid; place-items: center; padding-block: 18px; }
.donut { display: grid; place-items: center; width: 158px; height: 158px; border-radius: 50%; background: conic-gradient(#f59e0b 0 43.4%, #6366f1 43.4% 72.8%, #22c55e 72.8% 89.7%, #64748b 89.7% 100%); }
.donut::before { content: ""; grid-area: 1/1; width: 112px; height: 112px; border-radius: 50%; background: #0d1b2d; }
.donut div { z-index: 1; grid-area: 1/1; display: grid; gap: 2px; text-align: center; }
.donut strong { font-size: 16px; }
.donut span { color: #6f8299; font-size: 8px; }
.allocation-list { display: grid; gap: 11px; }
.allocation-list > div { display: flex; justify-content: space-between; gap: 12px; color: #8598af; font-size: 10px; }
.allocation-list span { display: flex; align-items: center; gap: 8px; }
.allocation-list strong { color: #d2dbe7; }
.coin-dot { width: 7px; height: 7px; border-radius: 50%; }
.coin-dot.btc { background: #f59e0b; }
.coin-dot.eth { background: #6366f1; }
.coin-dot.sol { background: #22c55e; }
.coin-dot.other { background: #64748b; }
.transactions-card { padding: 0; }
.transactions-card .card-head { padding: 20px 21px; }
.transaction-table .asset-cell { display: flex; align-items: center; gap: 10px; }
.transaction-table .coin-icon { width: 30px; height: 30px; font-size: 9px; }
.transaction-table .status-text { color: #fbbf24; font-size: 10px; }
.mobile-only { display: none; }

@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr auto; }
  .main-nav { display: none; }
  .hero { grid-template-columns: 1fr; gap: 40px; min-height: auto; padding-block: 70px; }
  .hero-panel { max-width: 680px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-icon { margin-bottom: 25px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-view.is-active { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 29px auto 0 0; z-index: 90; width: 245px; transform: translateX(-105%); transition: transform .22s ease; box-shadow: 20px 0 60px rgba(0,0,0,.4); }
  .sidebar.is-open { transform: translateX(0); }
  .mobile-only { display: grid; }
  .dashboard-header > div:first-child { grid-template-columns: auto 1fr; column-gap: 12px; }
  .dashboard-header > div:first-child .muted, .dashboard-header > div:first-child h1 { grid-column: 2; }
  .icon-button { grid-row: 1 / span 2; place-items: center; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 10px; background: rgba(255,255,255,.03); }
}

@media (max-width: 700px) {
  :root { --shell: min(100% - 28px, 1180px); }
  .demo-ribbon { font-size: 9px; }
  .site-header { padding: 13px 14px; }
  .header-actions .button-ghost { display: none; }
  .header-actions .button { min-height: 38px; padding-inline: 12px; font-size: 11px; }
  .brand { font-size: 18px; }
  .brand-mark { width: 29px; height: 29px; }
  .hero { padding-block: 50px 65px; }
  .hero-copy h1 { font-size: clamp(41px, 14vw, 60px); }
  .hero-copy > p { font-size: 15px; }
  .trust-row { display: grid; gap: 8px; }
  .hero-panel { padding: 16px; }
  .mini-market-item { grid-template-columns: 1fr auto; gap: 10px; }
  .mini-market-item .change { grid-column: 2; }
  .coin-price { display: none; }
  .market-section, .feature-section { padding-block: 65px; }
  .section-heading { align-items: start; flex-direction: column; }
  .section-heading .button { width: 100%; }
  th, td { padding-inline: 14px; }
  .cta-section { align-items: stretch; flex-direction: column; padding: 25px; }
  .site-footer .shell { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 28px; }
  .dashboard-main { padding: 20px 14px 45px; }
  .dashboard-header { align-items: start; }
  .user-chip div { display: none; }
  .balance-hero { align-items: stretch; flex-direction: column; padding: 21px; }
  .balance-line { align-items: flex-start; flex-direction: column; gap: 6px; }
  .balance-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .balance-actions .button { min-height: 44px; padding: 8px; font-size: 10px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-card { padding: 15px; }
  .metric-card strong { font-size: 17px; }
  .dashboard-card { padding: 16px; }
  .transactions-card { padding: 0; }
  .login-dialog form { padding: 26px 20px; }
}

@media (max-width: 420px) {
  .metric-grid { grid-template-columns: 1fr; }
  .hero-actions .button { width: 100%; }
  .panel-head { align-items: flex-start; }
}

/* SIREN presentation scenario */
#overview-section,
#portfolio-section,
#transactions-section,
#watchlist-section { scroll-margin-top: 28px; }
.positive-card strong { color: var(--positive); }
.legend-peak { background: #4ade80; }
.siren-donut { background: conic-gradient(#2dd4bf 0 100%); }
.coin-dot.siren { background: #2dd4bf; }
.coin-dot.peak { background: #4ade80; }
.coin-dot.current { background: #fb7185; }
.siren-icon { border-color: rgba(45,212,191,.28); background: rgba(45,212,191,.12); color: #9ff8ed; }
.watchlist-card { margin-top: 16px; padding: 0; overflow: hidden; }
.watchlist-card .card-head { padding: 20px 21px; }
.watchlist-table .asset-cell { display: flex; align-items: center; gap: 10px; }
.watchlist-table .coin-icon { width: 30px; height: 30px; font-size: 9px; }
.watchlist-featured { background: rgba(45,212,191,.045); }
.watchlist-featured:hover { background: rgba(45,212,191,.07); }
.scenario-footnote { padding: 14px 20px; border-top: 1px solid var(--border); background: rgba(251,191,36,.035); color: #778aa1; font-size: 10px; line-height: 1.6; }
.scenario-footnote strong { color: #f6d986; }
@media (max-width: 700px) {
  .watchlist-card { padding: 0; }
  #overview-section,
  #portfolio-section,
  #transactions-section,
  #watchlist-section { scroll-margin-top: 14px; }
}
