:root {
  --ink: #050505;
  --muted: #5d6675;
  --soft: #f5f7fa;
  --surface: #ffffff;
  --line: #e5e8ef;
  --blue: #1a4fe3;
  --cyan: #11a7d9;
  --green: #49b85a;
  --yellow: #ffc928;
  --orange: #ff8a1c;
  --red-orange: #f04a24;
  --shadow: 0 18px 46px rgba(10, 24, 48, 0.08);
  --logo-desktop-width: 182px;
  --logo-mobile-width: 132px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--surface);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(245, 247, 250, 0.9) 0, rgba(255, 255, 255, 0) 520px),
    var(--surface);
  color: var(--ink);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  min-height: 84px;
  padding: 18px clamp(20px, 5vw, 64px);
  border-bottom: 1px solid rgba(229, 232, 239, 0.82);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 170px;
}

.brand-logo {
  display: block;
  width: var(--logo-desktop-width);
  max-height: 46px;
  object-fit: contain;
}

.brand-logo:not([src]),
.brand-logo[src=""],
.brand-logo.is-missing {
  display: none;
}

.brand-fallback {
  font-size: 18px;
  font-weight: 750;
}

.brand-logo + .brand-fallback {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.brand-logo.is-missing + .brand-fallback {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 26px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.nav-links a {
  padding: 8px 0;
}

.nav-links a:hover {
  color: var(--ink);
}

.live-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  background: var(--surface);
}

.header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 34px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
}

.language-switcher button {
  min-width: 44px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.language-switcher button.is-active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 1px 2px rgba(10, 24, 48, 0.08);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(73, 184, 90, 0.14);
}

.section-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  align-items: center;
  gap: clamp(36px, 6vw, 72px);
  min-height: calc(100vh - 84px);
  padding: 68px 0 58px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(56px, 7.5vw, 112px);
  line-height: 0.92;
  letter-spacing: 0;
  white-space: nowrap;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
}

.hero-text {
  max-width: 600px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 750;
}

.primary-link {
  color: #fff;
  background: var(--ink);
}

.secondary-link {
  border: 1px solid var(--line);
  background: #fff;
}

.index-console,
.chart-shell,
.changes-panel,
.wallet-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.index-console {
  padding: clamp(26px, 4vw, 40px);
}

.console-topline,
.chart-header,
.metric-row,
.card-topline,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.console-topline {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.index-value-row {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  margin-top: 28px;
}

.index-value-row h2 {
  margin: 0;
  font-size: clamp(76px, 11vw, 148px);
  line-height: 0.84;
}

.change-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.positive {
  color: #166d2a;
  background: rgba(73, 184, 90, 0.14);
}

.negative {
  color: #a72d16;
  background: rgba(240, 74, 36, 0.12);
}

.neutral {
  color: var(--muted);
  background: var(--soft);
}

.index-note {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.mini-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 28px;
}

.mini-metrics div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.mini-metrics span,
.wallet-card span:not(.change-pill),
.metric-row span,
.chart-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.mini-metrics strong {
  display: block;
  margin-top: 5px;
  font-size: 18px;
}

.wallet-section,
.trend-section,
.operations-section,
.about-section {
  padding: 78px 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 34px;
}

.section-heading.compact {
  max-width: none;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.section-heading p:not(.eyebrow),
.about-section p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

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

.wallet-card {
  position: relative;
  overflow: hidden;
  min-height: 254px;
  padding: 24px;
}

.wallet-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--accent, var(--blue));
}

.wallet-card h3 {
  margin-top: 18px;
  font-size: 22px;
}

.wallet-address {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}

.wallet-address-empty {
  color: #a8afba;
}

.wallet-index {
  margin: 24px 0 20px;
  font-size: 48px;
  line-height: 0.95;
  font-weight: 800;
}

.metric-stack {
  display: grid;
  gap: 11px;
}

.metric-row {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.metric-row strong {
  font-size: 18px;
}

.chart-shell {
  padding: clamp(18px, 3vw, 28px);
}

.chart-header {
  margin-bottom: 18px;
}

.chart-header strong {
  display: block;
  margin-top: 4px;
  font-size: 34px;
}

.range-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.range-tabs button {
  min-width: 48px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.range-tabs button.is-active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 1px 2px rgba(10, 24, 48, 0.08);
}

.balance-chart {
  display: block;
  width: 100%;
  min-height: 280px;
}

.chart-grid {
  stroke: #e8ebf1;
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke: url(#portfolioGradient);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-area {
  fill: url(#areaGradient);
}

.chart-dot {
  fill: #fff;
  stroke: var(--orange);
  stroke-width: 4;
}

.axis-label {
  fill: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.chart-empty {
  fill: var(--muted);
  font-size: 18px;
  font-weight: 750;
}

.operations-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 22px;
}

.operation-list {
  display: grid;
  gap: 14px;
}

.operation-list article {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 18px;
  align-items: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.operation-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.operation-list p,
.changes-panel p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.changes-panel {
  padding: 24px;
}

.change-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.change-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.change-item:first-child {
  border-top: 0;
}

.change-empty {
  padding: 14px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.change-item strong {
  display: block;
  margin-bottom: 4px;
}

.change-item span {
  color: var(--muted);
  font-size: 13px;
}

.about-section {
  max-width: 920px;
}

.about-section h2 {
  max-width: 820px;
}

.site-footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 920px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .header-actions {
    grid-column: 1 / -1;
    justify-content: space-between;
  }

  .hero,
  .operations-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 54px;
  }

  .wallet-grid {
    grid-template-columns: 1fr;
  }

  .section-heading.compact {
    display: block;
  }
}

@media (max-width: 560px) {
  .site-header {
    min-height: 74px;
    padding: 14px 18px;
    gap: 16px;
  }

  .brand {
    min-width: 0;
  }

  .brand-logo {
    width: var(--logo-mobile-width);
  }

  .live-status {
    height: 30px;
    padding: 0 10px;
  }

  .section-shell,
  .site-footer {
    width: min(100% - 28px, 1180px);
  }

  h1 {
    font-size: 62px;
  }

  h2 {
    font-size: 34px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .primary-link,
  .secondary-link {
    width: 100%;
  }

  .index-value-row {
    display: block;
  }

  .index-value-row h2 {
    font-size: 86px;
  }

  .change-pill {
    margin-top: 14px;
  }

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

  .chart-header {
    display: grid;
    align-items: start;
  }

  .range-tabs {
    width: 100%;
  }

  .range-tabs button {
    flex: 1;
  }

  .balance-chart {
    min-height: 230px;
  }

  .operation-list article {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: grid;
  }
}
