/* ── POLYMARKET CLONE SCRIPT BENEFITS INFOGRAPHIC STYLES ── */
:root {
  --frame-width: 855px;
  --frame-height: 551px;
  --frame-inset: 30px;
  --frame-bg: #f6f4fa;
  --frame-purple: #4e1fa3;
  --frame-line: rgba(61, 61, 61, 0.6);
  --text-main: #191A1E;
}

.blog-frame {
  width: min(100%, var(--frame-width));
  min-height: var(--frame-height);
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  background: var(--frame-bg);
  box-shadow: 0 22px 60px rgba(53, 40, 90, 0.12);
  isolation: isolate;
}

.blog-frame::before {
  content: "";
  position: absolute;
  inset: var(--frame-inset);
  border: 1.474px solid var(--frame-line);
  border-radius: 20px;
  pointer-events: none;
  z-index: 2;
}

.blog-frame__canvas {
  position: relative;
  z-index: 1;
  padding: var(--frame-inset);
}

.blog-frame__header {
  padding: 29px 44px 17px;
  text-align: center;
}

.blog-frame__title {
  max-width: none;
  margin: 0 auto;
  color: #08070c;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.16;
}

.blog-frame__title span {
  color: var(--frame-purple);
  font-weight: 600;
}

.benefit-map {
  padding: 43px 39px 42px;
}

.benefit-map__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.benefit-map__center {
  display: none;
}

.benefit-node {
  width: 100%;
  min-height: 80px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(25, 26, 30, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text-main);
  cursor: pointer;
  font: inherit;
  text-align: left;
  padding: 13px;
  box-shadow: 0 10px 24px rgba(56, 47, 90, 0.08);
  transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.benefit-node:hover,
.benefit-node:focus-visible,
.benefit-node.is-active {
  background: var(--active-bg);
  border-color: var(--active-border);
  box-shadow: 0 16px 30px var(--active-shadow);
  transform: translateY(-3px);
}

.benefit-node:focus-visible {
  outline: 0;
}

.benefit-node__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 10px 18px var(--active-shadow);
  transition: transform 0.22s ease, background 0.22s ease;
}

.benefit-node:hover .benefit-node__icon,
.benefit-node:focus-visible .benefit-node__icon,
.benefit-node.is-active .benefit-node__icon {
  background: var(--accent-strong);
  transform: scale(1.08);
}

.benefit-node__icon svg {
  width: 24px;
  height: 24px;
  display: block;
  fill: currentColor;
}

.benefit-node__title {
  display: block;
  color: var(--text-main);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.16;
}

.benefit-node__text {
  display: block;
  margin-top: 5px;
  color: rgba(25, 26, 30, 0.68);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.22;
}

[data-theme="red"] {
  --accent: #ff4058;
  --accent-strong: #e82943;
  --active-bg: #fff0f3;
  --active-border: rgba(255, 64, 88, 0.38);
  --active-shadow: rgba(255, 64, 88, 0.2);
}

[data-theme="indigo"] {
  --accent: #3024aa;
  --accent-strong: #251a95;
  --active-bg: #f0efff;
  --active-border: rgba(48, 36, 170, 0.32);
  --active-shadow: rgba(48, 36, 170, 0.18);
}

[data-theme="teal"] {
  --accent: #168f8a;
  --accent-strong: #0f7773;
  --active-bg: #ecfbf9;
  --active-border: rgba(22, 143, 138, 0.32);
  --active-shadow: rgba(22, 143, 138, 0.18);
}

[data-theme="amber"] {
  --accent: #b56c12;
  --accent-strong: #96570b;
  --active-bg: #fff5e8;
  --active-border: rgba(181, 108, 18, 0.34);
  --active-shadow: rgba(181, 108, 18, 0.18);
}

[data-theme="violet"] {
  --accent: #8a62d9;
  --accent-strong: #704ac3;
  --active-bg: #f5f0ff;
  --active-border: rgba(138, 98, 217, 0.34);
  --active-shadow: rgba(138, 98, 217, 0.2);
}

[data-theme="coral"] {
  --accent: #f35c50;
  --accent-strong: #d9483f;
  --active-bg: #fff1ee;
  --active-border: rgba(243, 92, 80, 0.35);
  --active-shadow: rgba(243, 92, 80, 0.18);
}

[data-theme="green"] {
  --accent: #1b8e3d;
  --accent-strong: #126f2d;
  --active-bg: #effaf2;
  --active-border: rgba(27, 142, 61, 0.32);
  --active-shadow: rgba(27, 142, 61, 0.18);
}

[data-theme="blue"] {
  --accent: #1671b8;
  --accent-strong: #0e5b98;
  --active-bg: #eef7ff;
  --active-border: rgba(22, 113, 184, 0.32);
  --active-shadow: rgba(22, 113, 184, 0.18);
}

[data-theme="pink"] {
  --accent: #cf2e9c;
  --accent-strong: #ad1f82;
  --active-bg: #fff0fa;
  --active-border: rgba(207, 46, 156, 0.32);
  --active-shadow: rgba(207, 46, 156, 0.18);
}


@media (min-width: 768px) {
  .blog-frame {
    height: var(--frame-height);
    min-height: 0;
  }

  .benefit-map {
    padding: 43px 39px 42px;
  }

  .benefit-map__grid {
    min-height: 326px;
    display: grid;
    grid-template-columns: 1fr 190px 1fr;
    grid-template-rows: repeat(3, 1fr);
    gap: 12px 18px;
    position: relative;
  }

  .benefit-connector {
    position: absolute;
    display: block;
    pointer-events: none;
    z-index: 0;
  }

  .benefit-connector::before {
    content: "";
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(110, 105, 125, 0.42);
  }

  .benefit-connector--left {
    left: calc((100% - 190px - 36px) / 2);
    width: 72px;
    border-top: 2px solid rgba(110, 105, 125, 0.32);
    border-right: 2px solid rgba(110, 105, 125, 0.32);
    border-radius: 0 12px 0 0;
  }

  .benefit-connector--left::before {
    left: -4px;
    top: -4px;
  }

  .benefit-connector--right {
    right: calc((100% - 190px - 36px) / 2);
    width: 72px;
    border-top: 2px solid rgba(110, 105, 125, 0.32);
    border-left: 2px solid rgba(110, 105, 125, 0.32);
    border-radius: 12px 0 0 0;
  }

  .benefit-connector--right::before {
    right: -4px;
    top: -4px;
  }

  .benefit-connector--top {
    top: 47px;
    height: 98px;
  }

  .benefit-connector--mid {
    top: 162px;
    height: 0;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .benefit-connector--bottom {
    top: 180px;
    height: 98px;
    transform: scaleY(-1);
  }

  .benefit-connector--bottom::before {
    transform: scaleY(-1);
  }

  .benefit-map__center {
    display: grid;
    place-items: center;
    grid-column: 2;
    grid-row: 1 / 4;
    align-self: center;
    justify-self: center;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(78, 31, 163, 0.18);
    box-shadow: 0 18px 34px rgba(56, 47, 90, 0.12);
    z-index: 1;
  }

  .benefit-map__center-inner {
    width: 108px;
    height: 108px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #4e1fa3;
    color: #ffffff;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.18;
    padding: 16px;
  }

  .benefit-node {
    min-height: 94px;
    position: relative;
    z-index: 1;
  }

  .benefit-node:nth-child(1),
  .benefit-node:nth-child(2),
  .benefit-node:nth-child(3) {
    grid-column: 1;
  }

  .benefit-node:nth-child(4),
  .benefit-node:nth-child(5),
  .benefit-node:nth-child(6) {
    grid-column: 3;
  }

  .benefit-node:nth-child(1),
  .benefit-node:nth-child(4) {
    grid-row: 1;
  }

  .benefit-node:nth-child(2),
  .benefit-node:nth-child(5) {
    grid-row: 2;
  }

  .benefit-node:nth-child(3),
  .benefit-node:nth-child(6) {
    grid-row: 3;
  }
}

@media (max-width: 767.98px) {
  .blog-frame {
    height: auto !important;
    min-height: 0 !important;
    --frame-inset: 12px;
  }

  .blog-frame__canvas {
    position: relative !important;
    inset: auto !important;
    padding: var(--frame-inset) !important;
  }

  .blog-frame__header {
    padding: 20px 10px 10px !important;
  }

  .blog-frame__title {
    font-size: 20px !important;
    line-height: 1.3 !important;
    text-align: center;
  }

  .benefit-map__grid {
    gap: 10px !important;
  }

  .benefit-node {
    padding: 10px !important;
    min-height: 70px !important;
  }

  .benefit-node__icon {
    width: 36px !important;
    height: 36px !important;
  }

  .benefit-node__icon svg {
    width: 18px !important;
    height: 18px !important;
  }

  .benefit-node__title {
    font-size: 14px !important;
  }

  .benefit-node__text {
    font-size: 11px !important;
    margin-top: 3px !important;
  }

  .benefit-connector {
    display: none !important;
  }
}

@media (max-width: 575px) {
  .blog-frame__title {
    font-size: 18px !important;
  }
}