:root {
  --ink: #101314;
  --muted: #66706b;
  --paper: #f6f7f3;
  --white: #ffffff;
  --line: #d9ddd7;
  --green: #00a870;
  --green-dark: #08714f;
  --red: #d64c4c;
  --amber: #f0a12b;
  --blue: #4975e8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 68px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto max-content;
  align-items: center;
  gap: 28px;
  padding: 0 max(24px, calc((100vw - 1240px) / 2));
  background: rgba(246, 247, 243, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; width: max-content; font-size: 15px; font-weight: 750; }
.brand b { color: var(--green); }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; color: #fff; background: var(--ink); font-size: 17px; }
nav { position: absolute; left: 50%; display: flex; justify-content: center; gap: 28px; width: max-content; transform: translateX(-50%); font-size: 14px; color: #3e4642; text-align: center; }
nav a:hover, footer a:hover { color: var(--green-dark); }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 8px; min-width: 0; margin-left: auto; }
.button-telegram { color: var(--green-dark); border-color: var(--green-dark); }

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}
.button:hover { transform: translateY(-2px); }
.button svg { width: 17px; height: 17px; }
.button-small { min-height: 38px; padding: 0 14px; }
.button-primary { color: #fff; background: var(--green-dark); border-color: var(--green-dark); }
.button-quiet { background: transparent; }
.button-light { color: var(--ink); background: #fff; border-color: #fff; }
.button-outline-light { color: #fff; border-color: rgba(255,255,255,.6); }

.market-stage {
  min-height: calc(100vh - 68px);
  padding: clamp(46px, 7vh, 84px) max(24px, calc((100vw - 1240px) / 2)) 52px;
  background: var(--paper);
}
.stage-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: end; }
.eyebrow { margin: 0 0 14px; color: var(--green-dark); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.live-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 5px rgba(214,76,76,.12); }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 780px; margin-bottom: 16px; font-size: clamp(38px, 5.4vw, 74px); line-height: 1.02; letter-spacing: 0; }
.lead { max-width: 720px; margin-bottom: 0; color: var(--muted); font-size: 17px; line-height: 1.75; }
.stage-actions { display: flex; flex-direction: column; gap: 10px; min-width: 184px; }

.ticker-grid { display: grid; grid-template-columns: 1fr 1fr .72fr; margin-top: 42px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ticker-card, .market-pulse { min-height: 116px; padding: 24px 28px; border-right: 1px solid var(--line); }
.market-pulse { border-right: 0; }
.ticker-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.coin-label { display: flex; align-items: center; gap: 12px; }
.coin-label div { display: flex; flex-direction: column; gap: 5px; }
.coin-label strong { font-size: 15px; }
.coin-label div span { color: var(--muted); font-size: 11px; }
.coin-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: #fff; font-size: 22px; font-weight: 700; }
.btc { background: var(--amber); }
.eth { background: var(--blue); }
.ticker-value { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.price { font-size: clamp(21px, 2vw, 29px); font-weight: 760; font-variant-numeric: tabular-nums; }
.change { color: var(--muted); font-size: 12px; font-weight: 700; }
.change.positive { color: var(--green-dark); }
.change.negative { color: var(--red); }
.market-pulse { display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.pulse-label, #updated-at { color: var(--muted); font-size: 11px; }
.market-pulse strong { font-size: 15px; }

.chart-shell { margin-top: 28px; }
.chart-toolbar { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 10px; }
.chart-toolbar > div:first-child { display: flex; flex-direction: column; gap: 5px; }
.chart-kicker { color: var(--muted); font-size: 11px; }
.chart-legend { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.chart-legend span { width: 18px; height: 2px; background: var(--green); }
.canvas-wrap { height: clamp(190px, 27vh, 300px); border-bottom: 1px solid var(--line); }
canvas { width: 100%; height: 100%; display: block; }
.chart-axis { display: flex; justify-content: space-between; padding-top: 8px; color: #7d8580; font-size: 10px; }

.guide-band { display: grid; grid-template-columns: .72fr 1.28fr; gap: 76px; align-items: center; padding: 88px max(24px, calc((100vw - 1240px) / 2)); background: #dfe9e1; }
.guide-intro > p:not(.eyebrow) { max-width: 470px; margin: 22px 0 24px; color: #52605a; line-height: 1.8; }
.text-link { display: inline-flex; align-items: center; gap: 7px; color: var(--green-dark); font-size: 14px; font-weight: 800; }
.text-link svg { width: 16px; height: 16px; }
.guide-cards { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #bdccc0; border-bottom: 1px solid #bdccc0; }
.guide-cards article { min-height: 218px; padding: 24px 22px 20px 0; border-right: 1px solid #bdccc0; }
.guide-cards article + article { padding-left: 22px; }
.guide-cards article:last-child { border-right: 0; }
.guide-cards span { color: var(--green-dark); font-size: 11px; font-weight: 800; }
.guide-cards h3 { margin: 48px 0 12px; font-size: 19px; }
.guide-cards p { margin: 0; color: #5c6861; font-size: 13px; line-height: 1.7; }

.signal-band { padding: 88px max(24px, calc((100vw - 1240px) / 2)); background: #fff; }
.signal-copy { max-width: 860px; min-width: 0; }
.signal-intro { max-width: 540px; margin: 20px 0 28px; color: var(--muted); line-height: 1.8; }
.signal-points { border-top: 1px solid var(--line); }
.signal-points > div { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; min-width: 0; padding: 16px 0; border-bottom: 1px solid var(--line); }
.signal-points p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.signal-points strong { color: var(--ink); font-size: 14px; }
.signal-marker { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; font-size: 17px; font-weight: 800; }
.signal-marker.up { background: var(--green-dark); }
.signal-marker.down { background: var(--red); }
.signal-marker.check { background: var(--blue); font-size: 15px; }
.signal-actions { display: flex; align-items: center; gap: 20px; margin-top: 26px; }

.content-band, .risk-band, .community-band { padding: 88px max(24px, calc((100vw - 1240px) / 2)); }
.content-band { background: var(--white); }
.section-heading { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: end; margin-bottom: 50px; }
h2 { margin-bottom: 0; font-size: clamp(29px, 3.2vw, 46px); line-height: 1.12; }
.section-heading > p { max-width: 520px; margin-bottom: 0; color: var(--muted); line-height: 1.75; }
.insight-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.insight-item { position: relative; min-height: 260px; padding: 32px 30px 18px 0; border-right: 1px solid var(--line); }
.insight-item + .insight-item { padding-left: 30px; }
.insight-item:last-child { border-right: 0; }
.insight-item svg { width: 28px; height: 28px; color: var(--green-dark); }
.insight-item > span { position: absolute; top: 35px; right: 28px; color: #a5aba7; font-size: 12px; }
.insight-item h3 { margin: 58px 0 12px; font-size: 20px; }
.insight-item p { max-width: 300px; color: var(--muted); line-height: 1.7; }

.risk-band { display: grid; grid-template-columns: 1.2fr .8fr; gap: 90px; align-items: center; background: #e9eee8; }
.risk-copy p:last-child { max-width: 700px; margin: 24px 0 0; color: #505955; line-height: 1.8; }
.risk-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid #c7cec7; }
.risk-list li { display: flex; align-items: center; gap: 12px; min-height: 58px; border-bottom: 1px solid #c7cec7; font-size: 14px; }
.risk-list svg { width: 18px; color: var(--green-dark); }

.community-band { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 48px; color: #fff; background: var(--ink); }
.community-band .eyebrow { color: #7ee1bd; }
.community-band p:last-child { max-width: 620px; margin: 18px 0 0; color: #aab3ae; line-height: 1.7; }
.community-actions { display: flex; gap: 10px; }

footer { min-height: 132px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 30px; padding: 24px max(24px, calc((100vw - 1240px) / 2)); background: #070909; color: #939c97; font-size: 12px; }
.footer-brand { color: #fff; }
footer p { margin: 0; text-align: center; }
footer > div:last-child { display: flex; justify-content: flex-end; gap: 20px; }

@media (max-width: 820px) {
  .site-header { grid-template-columns: minmax(0, 1fr) max-content; height: 62px; padding-inline: 18px; }
  nav { display: none; }
  .button-small span { display: none; }
  .button-small { width: 40px; min-height: 40px; padding: 0; }
  .market-stage { min-height: auto; padding: 40px 18px 38px; }
  .stage-heading, .section-heading, .guide-band, .signal-band, .risk-band, .community-band { grid-template-columns: 1fr; }
  .stage-heading { gap: 28px; }
  .stage-actions { flex-direction: row; min-width: 0; }
  .stage-actions .button { flex: 1; }
  .ticker-grid { grid-template-columns: 1fr; }
  .ticker-card, .market-pulse { min-height: 92px; padding: 18px 4px; border-right: 0; border-bottom: 1px solid var(--line); }
  .market-pulse { min-height: 74px; border-bottom: 0; }
  .content-band, .risk-band, .community-band { padding: 64px 18px; }
  .guide-band { padding: 64px 18px; gap: 38px; }
  .signal-band { padding: 64px 18px; }
  .section-heading { gap: 20px; margin-bottom: 38px; }
  .insight-grid { grid-template-columns: 1fr; }
  .guide-cards { grid-template-columns: 1fr; }
  .guide-cards article, .guide-cards article + article { min-height: 175px; padding: 24px 0; border-right: 0; border-bottom: 1px solid #bdccc0; }
  .guide-cards article:last-child { border-bottom: 0; }
  .guide-cards h3 { margin-top: 28px; }
  .insight-item, .insight-item + .insight-item { min-height: 210px; padding: 28px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .insight-item:last-child { border-bottom: 0; }
  .insight-item > span { right: 0; }
  .risk-band { gap: 38px; }
  .community-band { gap: 32px; }
  .community-actions { flex-wrap: wrap; }
  .signal-actions { align-items: flex-start; flex-direction: column; gap: 16px; }
  .signal-copy h2 { font-size: clamp(29px, 9vw, 40px); overflow-wrap: anywhere; }
  .signal-points p { overflow-wrap: anywhere; }
  footer { grid-template-columns: 1fr; padding: 40px 18px; text-align: left; }
  footer p { text-align: left; }
  footer > div:last-child { justify-content: flex-start; }
}

@media (max-width: 520px) {
  h1 { font-size: 40px; }
  .lead { font-size: 15px; }
  .stage-actions { flex-direction: column; }
  .ticker-card { align-items: flex-start; }
  .price { font-size: 21px; }
  .chart-toolbar { align-items: flex-start; }
  .chart-legend { display: none; }
  .community-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
