:root {
  --bg: #ffffff;
  --text: #111111;
  --border: #111111;
  --muted: #666666;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    "Comic Neue",
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
}

.wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 40px 18px 64px;
}

.section {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin: 18px 0;
}

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.sub {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.btn {
  appearance: none;
  border: 2px solid var(--border);
  background: transparent;
  color: var(--text);
  padding: 10px 14px;
  border-radius: 0; /* square-ish */
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.08s ease;
  user-select: none;
}

.btn:active {
  transform: translateY(1px);
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.label {
  font-weight: 700;
  margin-bottom: 10px;
  display: inline-block;
}

.ca-box {
  flex: 1;
  min-width: 260px;
  border: 2px solid var(--border);
  border-radius: 0;
  padding: 12px 12px;
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

/* Simple “image” with rocking animation */
.sticker {
  width: 140px;
  height: 140px;
  border: 2px solid var(--border);
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 54px;
  transform-origin: 50% 85%;
  animation: rock 2.4s ease-in-out infinite;
}

@keyframes rock {
  0%,
  100% {
    transform: rotate(-4deg) translateY(0);
  }
  50% {
    transform: rotate(4deg) translateY(-2px);
  }
}

h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.roadmap {
  display: grid;
  gap: 10px;
}

.item {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.item b {
  display: inline-block;
  margin-bottom: 6px;
}

ul {
  margin: 8px 0 0 18px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  border: 2px solid var(--border);
  background: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

footer {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.hero-img {
  width: 100%;
  height: auto;
  border-radius: 18px;
}

/* ===== Buttons ===== */
.btn {
  --border: #000;
  --bg: #fff;
  --text: #000;

  appearance: none;
  background: var(--bg);
  color: var(--text);

  border: 2px solid var(--border);
  border-radius: 0; /* квадратные */

  padding: 12px 18px;
  font-weight: 700;
  font-size: 16px;
  font-family: inherit;

  cursor: pointer;
  text-decoration: none;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

/* Hover — комикс-прыжок */
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 #000;
}

/* Active — "вдавливается" */
.btn:active {
  transform: translate(0, 0);
  box-shadow: 1px 1px 0 #000;
}

/* Focus (доступность) */
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.25);
}

/* Disabled */
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* ===== Chart block ===== */
.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.chart-wrap {
  margin-top: 14px;
  border: 2px solid #000;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  background: #fff;
  height: min(70vh, 520px);
}

.chart-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.chart-skeleton {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 700;
  border: 0;
  background: repeating-linear-gradient(
    90deg,
    #fff 0px,
    #fff 16px,
    #f3f3f3 16px,
    #f3f3f3 32px
  );
}

/* Better mobile stacking for hero */
@media (max-width: 640px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .sticker {
    width: 120px;
    height: 120px;
    font-size: 48px;
  }
}
