/* YearBull — single market styles (scoped) */
/* =========================
   Market page only: kill theme width/containers (как у coin)
   ========================= */
body.single-market #page.site,
body.single-market .site,
body.single-market .container,
body.single-market .wrap,
body.single-market .site-content,
body.single-market #content.site-content,
body.single-market #content.site-content.fixed,
body.single-market .site-content-inner,
body.single-market #primary.content-area,
body.single-market main#main.site-main{
  max-width:none !important;
  width:100% !important;
}

body.single-market #primary.content-area{
  float:none !important;
  margin:0 !important;
}

/* main padding */
body.single-market main#main.site-main{
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  padding:24px clamp(16px, 2vw, 40px) !important;
}

/* если у тебя в шаблоне есть .yb-market__article — пусть тоже растягивается */
body.single-market .yb-market__article{
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
}

/* ===== FULL WIDTH HARD OVERRIDE (Yelly containers) ===== */
body.single-market #content.site-content.fixed{
  padding-left:0 !important;
  padding-right:0 !important;
  margin:0 !important;
  width:100% !important;
  max-width:none !important;
}

body.single-market .site-content-inner{
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  padding:0 !important;
  justify-content:flex-start !important;
}

body.single-market #primary.content-area{
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  padding:0 !important;
  flex:1 1 auto !important;
}

body.single-market main#main.site-main{
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
}

/* whole page layout: left + center + right (like single-coin) */
body.single-market .yb-market__layout{
  margin-top: 14px;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr) 380px;
  gap: 18px;
  align-items: start;
}

@media (max-width: 1200px){
  body.single-market .yb-market__layout{
    grid-template-columns: 320px minmax(0, 1fr);
  }
  body.single-market .yb-market__right{
    grid-column: 2;
  }
}

@media (max-width: 900px){
  body.single-market .yb-market__layout{
    grid-template-columns: 1fr;
  }
}

/* sticky right column on desktop */
@media (min-width: 1201px){
  body.single-market .yb-market__right{
    position: sticky;
    top: 18px;
    align-self: start;
  }
}

/* left column facts should be vertical */
body.single-market .yb-market__left .yb-market__facts{
  grid-template-columns: 1fr !important;
}

body.single-market .yb-market__left .yb-market__facts > div{
  font-size: 13px;
}

@media (max-width: 1100px){
  body.single-market .yb-market__layout{
    grid-template-columns: 1fr;
  }
}

/* sticky sidebar on desktop */
@media (min-width: 1101px){
  body.single-market .yb-market__side{
    position: sticky;
    top: 18px;
    align-self: start;
  }
}

/* top pairs list look */
body.single-market .yb-pairs{
  margin: 0;
  padding-left: 18px;
}
body.single-market .yb-pairs li{
  display:flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(15,23,42,.10);
  font-variant-numeric: tabular-nums;
}
body.single-market .yb-pairs li:last-child{ border-bottom: 0; }
body.single-market .yb-pairs .k{
  font-weight: 900;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.single-market .yb-pairs .v{
  font-weight: 900;
  opacity: .75;
  white-space: nowrap;
}

.yb-market{
  --yb-bg: #ffffff;
  --yb-card: #ffffff;
  --yb-surface: rgba(15,23,42,.04);
  --yb-border: rgba(15,23,42,.10);
  --yb-text: #0f172a;
  --yb-muted: rgba(15,23,42,.68);
  --yb-link: #16a34a;
  --yb-link2: #22c55e;
  --yb-shadow: 0 10px 26px rgba(15,23,42,.10);
  --yb-shadow-soft: 0 6px 18px rgba(15,23,42,.08);
  --yb-r: 16px;
  --yb-rs: 12px;
  color: var(--yb-text);
}

@media (prefers-color-scheme: dark){
  .yb-market{
    --yb-bg: #0b1220;
    --yb-card: rgba(255,255,255,.06);
    --yb-surface: rgba(255,255,255,.04);
    --yb-border: rgba(255,255,255,.10);
    --yb-text: rgba(255,255,255,.92);
    --yb-muted: rgba(255,255,255,.70);
    --yb-link: #22c55e;
    --yb-link2: #34d399;
    --yb-shadow: 0 10px 26px rgba(0,0,0,.40);
    --yb-shadow-soft: 0 8px 18px rgba(0,0,0,.30);
  }
}

/* если у темы есть ручной dark-класс */
body.dark .yb-market, body.dark-mode .yb-market, body.is-dark .yb-market, .dark body .yb-market{
  --yb-bg: #0b1220;
  --yb-card: rgba(255,255,255,.06);
  --yb-surface: rgba(255,255,255,.04);
  --yb-border: rgba(255,255,255,.10);
  --yb-text: rgba(255,255,255,.92);
  --yb-muted: rgba(255,255,255,.70);
  --yb-link: #22c55e;
  --yb-link2: #34d399;
  --yb-shadow: 0 10px 26px rgba(0,0,0,.40);
  --yb-shadow-soft: 0 8px 18px rgba(0,0,0,.30);
}

/* container */
.yb-market .yb-market__article{
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 14px 56px;
}
@media (min-width: 900px){
  .yb-market .yb-market__article{ padding: 22px 0 70px; }
}

/* HERO */
.yb-market .yb-market__header{
  position: relative;
  border: 1px solid var(--yb-border);
  background:
    radial-gradient(520px 260px at 15% 0%, rgba(34,197,94,.18), rgba(34,197,94,0) 60%),
    radial-gradient(520px 260px at 85% 0%, rgba(34,197,94,.10), rgba(34,197,94,0) 55%),
    var(--yb-card);
  border-radius: var(--yb-r);
  box-shadow: var(--yb-shadow-soft);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: hidden;
}

.yb-market .yb-market__logo{
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid var(--yb-border);
  background: var(--yb-surface);
  object-fit: contain;
  padding: 6px;
  flex: 0 0 auto;
}

.yb-market .yb-market__titlewrap{ min-width: 0; }
.yb-market .yb-market__title{
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.06;
  font-size: 26px;
}
@media (min-width: 900px){
  .yb-market .yb-market__title{ font-size: 34px; }
}


/* HERO: Key Facts tiles on desktop (like single-coin top row) */
.yb-market .yb-market__titlewrap{ flex: 1 1 auto; min-width: 0; }

.yb-market .yb-market__hero-kf{ display: none; margin-left: auto; width: min(860px, 100%); }

@media (min-width: 900px){
  .yb-market .yb-market__hero-kf{ display: block; }
  .yb-market .yb-market__hero-kf .yb-kf__tiles{
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
  }
  .yb-market .yb-market__hero-kf .yb-kf__tile{
    padding: 12px 12px 10px;
    border-radius: 16px;
  }
  .yb-market .yb-market__hero-kf .yb-kf__head{
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
  }
  .yb-market .yb-market__hero-kf .yb-kf__k{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .yb-market .yb-market__hero-kf .yb-kf__v{
    font-size: 18px;
    line-height: 1.15;
  }
  /* Hide duplicate tiles inside the Key Facts block on desktop */
  .yb-market .yb-market__facts .yb-kf__tiles{ display: none; }
}
@media (max-width: 899px){
  /* Mobile/tablet: show tiles inside Key Facts block, not in hero */
  .yb-market .yb-market__hero-kf{ display: none; }
}
/* FACTS row */
.yb-market .yb-market__facts{
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 520px){
  .yb-market .yb-market__facts{ grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px){
  .yb-market .yb-market__facts{ grid-template-columns: repeat(6, 1fr); }
}

.yb-market .yb-market__facts > div{
  border: 1px solid var(--yb-border);
  background: var(--yb-card);
  border-radius: var(--yb-rs);
  box-shadow: var(--yb-shadow-soft);
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.25;
  overflow: hidden;
}
.yb-market .yb-market__facts strong{
  display: block;
  font-size: 12px;
  color: var(--yb-muted);
  margin-bottom: 6px;
  font-weight: 800;
  letter-spacing: .01em;
}
.yb-market .yb-market__facts a{
  color: var(--yb-link);
  text-decoration: none;
  border-bottom: 1px solid rgba(34,197,94,.25);
}
.yb-market .yb-market__facts a:hover{
  color: var(--yb-link2);
  border-bottom-color: rgba(34,197,94,.45);
}

/* Socials */
.yb-market .yb-market__socials{
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.yb-market .yb-market__socials a{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--yb-border);
  background: var(--yb-surface);
  color: var(--yb-text);
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
}
.yb-market .yb-market__socials a:hover{
  border-color: rgba(34,197,94,.35);
  background: rgba(34,197,94,.10);
  color: var(--yb-link2);
}

/* About + Volume + Spot sections spacing */
.yb-market .yb-market__about,
.yb-market .yb-market__volume,
.yb-market .yb-market__spot{
  margin-top: 16px;
}

/* section titles */
.yb-market .yb-market__about h2,
.yb-market .yb-market__volume h2,
.yb-market .yb-market__spot h2{
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

/* About content */
.yb-market .yb-market__about{
  border: 1px solid var(--yb-border);
  background: var(--yb-card);
  border-radius: var(--yb-r);
  box-shadow: var(--yb-shadow-soft);
  padding: 16px;
}
.yb-market .yb-market__about p{ margin: 0 0 12px; color: var(--yb-text); line-height: 1.65; }
.yb-market .yb-market__about a{
  color: var(--yb-link);
  text-decoration: none;
  border-bottom: 1px solid rgba(34,197,94,.25);
}
.yb-market .yb-market__about a:hover{
  color: var(--yb-link2);
  border-bottom-color: rgba(34,197,94,.45);
}

/* Volume block */
.yb-market #ybVolChart{
  margin-top: 10px;
  border: 1px solid var(--yb-border);
  background: var(--yb-card);
  border-radius: var(--yb-r);
  box-shadow: var(--yb-shadow-soft);
  min-height: 190px;
  overflow: hidden;
}
.yb-market .yb-market__hint{
  margin-top: 10px;
  color: var(--yb-muted);
  font-size: 13px;
}

/* Grid blocks (pair/currency lists) */
.yb-market .yb-market__grid{
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 900px){
  .yb-market .yb-market__grid{ grid-template-columns: 1fr 1fr; gap: 18px; }
}

.yb-market .yb-market__card{
  border: 1px solid var(--yb-border);
  background: var(--yb-card);
  border-radius: var(--yb-r);
  box-shadow: var(--yb-shadow-soft);
  padding: 16px;
}
.yb-market .yb-market__card h3{
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--yb-text);
}

.yb-market #ybByPair, .yb-market #ybByCur{
  border: 1px solid var(--yb-border);
  background: var(--yb-surface);
  border-radius: var(--yb-rs);
  padding: 10px 12px;
}
.yb-market #ybByPair .yb-row, .yb-market #ybByCur .yb-row{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--yb-border);
  font-variant-numeric: tabular-nums;
}
.yb-market #ybByPair .yb-row:last-child, .yb-market #ybByCur .yb-row:last-child{ border-bottom: 0; }
.yb-market #ybByPair .k, .yb-market #ybByCur .k{
  font-weight: 900;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.yb-market #ybByPair .v, .yb-market #ybByCur .v{
  color: var(--yb-muted);
  font-weight: 900;
  white-space: nowrap;
}

/* Spot table */
.yb-market .yb-market__tablewrap{
  margin-top: 10px;
  border: 1px solid var(--yb-border);
  background: var(--yb-card);
  border-radius: var(--yb-r);
  box-shadow: var(--yb-shadow-soft);
  overflow: hidden;
}

/* reuse yb-table styles but scoped */
.yb-market .yb-table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}
.yb-market .yb-table thead th{
  text-align: left;
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--yb-muted);
  background: var(--yb-surface);
  border-bottom: 1px solid var(--yb-border);
  padding: 12px 12px;
}
.yb-market .yb-table tbody td{
  padding: 12px 12px;
  border-bottom: 1px solid var(--yb-border);
  vertical-align: middle;
  color: var(--yb-text);
}
.yb-market .yb-table tbody tr:hover td{
  background: rgba(34,197,94,.06);
}
.yb-market .yb-table tbody tr:last-child td{ border-bottom: 0; }
.yb-market .yb-table .is-num{
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.yb-market .yb-table a{
  color: var(--yb-link);
  text-decoration: none;
}
.yb-market .yb-table a:hover{
  color: var(--yb-link2);
  text-decoration: underline;
}

/* pager buttons (match coin style vibe) */
.yb-market .yb-market__pager{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}
.yb-market #ybPage{
  color: var(--yb-muted);
  font-weight: 900;
  font-size: 13px;
  white-space: nowrap;
}

.yb-market .yb-btn,
.yb-market #ybPrev, .yb-market #ybNext{
  appearance: none;
  border: 1px solid var(--yb-border);
  background: var(--yb-surface);
  color: var(--yb-text);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;
  transition: transform .06s ease, border-color .12s ease, background-color .12s ease;
}
.yb-market .yb-btn:hover,
.yb-market #ybPrev:hover, .yb-market #ybNext:hover{
  border-color: rgba(34,197,94,.35);
  background: rgba(34,197,94,.10);
}
.yb-market .yb-btn:active,
.yb-market #ybPrev:active, .yb-market #ybNext:active{
  transform: translateY(1px);
}


/* =========================================================
   Key Facts (mobile tiles + Show more) — YearBull
   Works with markup: .yb-kf__tiles / .yb-kf__tile / .yb-kf__more (single-market.php)
   ========================================================= */

body.single-market .yb-kf{
  margin:0 !important;
  padding:0 !important;
}

body.single-market .yb-kf__tiles{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:12px;
  margin:0;
  padding:0;
}

body.single-market .yb-kf__tile{
  border: 1px solid var(--yb-border);
  background: var(--yb-card);
  border-radius: var(--yb-rs);
  box-shadow: var(--yb-shadow-soft);
  padding: 12px 12px 12px;
  min-width:0;
}

body.single-market .yb-kf__head{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

body.single-market .yb-kf__ico{
  width:34px;
  height:34px;
  border-radius:12px;
  border:2px solid rgba(34,197,94,.45);
  background: rgba(34,197,94,.10);
  flex:0 0 auto;
  position:relative;
  display:inline-block;
}

/* SVG icons (data URI) */
body.single-market .yb-kf__ico:before{
  content:"";
  position:absolute;
  inset:0;
  margin:auto;
  width:18px;
  height:18px;
  background-repeat:no-repeat;
  background-position:center;
  background-size:18px 18px;
  opacity:.95;
}

body.single-market .yb-kf__ico--rank:before{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 21h8'/%3E%3Cpath d='M12 17v4'/%3E%3Cpath d='M7 4h10'/%3E%3Cpath d='M17 4v5a5 5 0 0 1-10 0V4'/%3E%3Cpath d='M7 6H5a3 3 0 0 0 3 3'/%3E%3Cpath d='M17 6h2a3 3 0 0 1-3 3'/%3E%3C/svg%3E");
}
body.single-market .yb-kf__ico--date:before{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='3'/%3E%3Cpath d='M16 2v4'/%3E%3Cpath d='M8 2v4'/%3E%3Cpath d='M3 10h18'/%3E%3C/svg%3E");
}
body.single-market .yb-kf__ico--vol:before{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19V5'/%3E%3Cpath d='M10 19V9'/%3E%3Cpath d='M16 19v-6'/%3E%3Cpath d='M22 19V7'/%3E%3C/svg%3E");
}
body.single-market .yb-kf__ico--web:before{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20'/%3E%3Cpath d='M12 2a15 15 0 0 1 0 20'/%3E%3Cpath d='M12 2a15 15 0 0 0 0 20'/%3E%3C/svg%3E");
}

body.single-market .yb-kf__k{
  font-size:12px;
  line-height:1.15;
  color: var(--yb-muted);
  font-weight: 900;
  letter-spacing: .01em;
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

body.single-market .yb-kf__v{
  margin-top:10px;
  font-size:16px;
  font-weight:900;
  line-height:1.1;
  font-variant-numeric: tabular-nums;
  min-width:0;
  overflow-wrap:anywhere;
  word-break:break-word;
}
body.single-market .yb-kf__v a{ color: var(--yb-link); text-decoration:none; }
body.single-market .yb-kf__v a:hover{ color: var(--yb-link2); text-decoration:underline; }

/* Show more */
body.single-market .yb-kf__more{
  margin-top:12px;
  border:1px solid var(--yb-border);
  background: var(--yb-surface);
  border-radius: var(--yb-rs);
  overflow:hidden;
}

body.single-market .yb-kf__more > summary{
  list-style:none;
  cursor:pointer;
  padding:12px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-weight:900;
}
body.single-market .yb-kf__more > summary::-webkit-details-marker{ display:none; }

body.single-market .yb-kf__chev{
  width:10px; height:10px;
  border-right:2px solid rgba(34,197,94,.75);
  border-bottom:2px solid rgba(34,197,94,.75);
  transform: rotate(45deg);
  transition: transform .12s ease;
  flex:0 0 auto;
}
body.single-market .yb-kf__more[open] .yb-kf__chev{ transform: rotate(-135deg); }

body.single-market .yb-kf__more-body{
  padding: 0 12px 12px;
  display:grid;
  gap:8px;
}

body.single-market .yb-kf__row{
  padding:10px 10px;
  border-radius: 12px;
  border:1px solid var(--yb-border);
  background: var(--yb-card);
  font-size:13px;
  line-height:1.25;
  display:flex;
  justify-content:space-between;
  gap:12px;
}
body.single-market .yb-kf__row strong{
  color: var(--yb-muted);
  font-weight:900;
}

/* =========================================================
   Mobile: edge-to-edge (no theme padding)
   ========================================================= */
@media (max-width: 768px){
  body.single-market #content.site-content,
  body.single-market #content.site-content.fixed{
    padding-left:0 !important;
    padding-right:0 !important;
  }

  body.single-market main#main.site-main{
    padding:0 !important;
  }

  .yb-market .yb-market__article{
    max-width:none !important;
    margin:0 !important;
    padding:0 !important;
  }

  /* cards breathe internally */
  .yb-market .yb-market__header,
  .yb-market .yb-market__facts,
  .yb-market .yb-market__about,
  .yb-market .yb-market__volume,
  .yb-market .yb-market__spot,
  .yb-market .yb-market__tablewrap,
  .yb-market .yb-market__card{
    margin-left:14px;
    margin-right:14px;
  }

  /* key facts card full width */
  body.single-market .yb-market__card--facts{
    margin-left:14px;
    margin-right:14px;
  }
}

/* =========================================================
   Links block: collapsed by default (details)
   ========================================================= */
body.single-market .yb-collapsible > summary{
  list-style:none;
}
body.single-market .yb-collapsible > summary::-webkit-details-marker{ display:none; }
body.single-market .yb-collapsible > summary{
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
body.single-market .yb-collapsible .yb-collapsible__chev{
  width:10px; height:10px;
  border-right:2px solid rgba(34,197,94,.75);
  border-bottom:2px solid rgba(34,197,94,.75);
  transform: rotate(45deg);
  transition: transform .12s ease;
}
body.single-market .yb-collapsible[open] .yb-collapsible__chev{ transform: rotate(-135deg); }



/* ============================
   Market polish fixes (v2)
   - nicer chevrons
   - article meta 2x2 tiles
   - content card padding like coin
   ============================ */

/* Nicer chevrons (bigger, cleaner) */
body.single-market .yb-kf__chev,
body.single-market .yb-collapsible .yb-collapsible__chev{
  width:14px;
  height:14px;
  border-right:3px solid rgba(34,197,94,.85);
  border-bottom:3px solid rgba(34,197,94,.85);
  border-radius:2px;
}

/* Force meta tiles to 2 columns on mobile (2 rows for 4 items) */
body.single-market .yb-article-meta{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:12px;
  margin: 0 0 14px;
}
body.single-market .yb-article-meta .yb-meta-item{
  width:100%;
  min-width:0;
}
body.single-market .yb-article-meta .yb-meta-item:last-child{
  grid-column:auto !important; /* prevent full-width dates */
}

/* Content/About as card with padding (like coin) */
body.single-market .yb-market__card--content,
body.single-market .yb-market__card--about{
  background: var(--yb-card);
  border:1px solid var(--yb-border);
  border-radius: var(--yb-rs);
  padding:16px;
}
body.single-market .yb-market__card--content .entry-content,
body.single-market .yb-market__card--about .entry-content{
  padding:0 !important; /* card already has padding */
}
body.single-market .yb-market__card--about h2{
  margin-top:0;
}

/* Mobile: keep content card margins in edge-to-edge list */
@media (max-width: 768px){
  .yb-market .yb-market__card--content,
  .yb-market .yb-market__card--about{
    margin-left:14px;
    margin-right:14px;
  }
}


/* === Market Hero Meta (desktop in hero, mobile below) === */

@media (min-width: 900px){
  body.single-market .yb-market__titlewrap{ flex: 1 1 auto; }
  body.single-market .yb-market__meta-row{ flex: 0 0 auto; margin-left: auto; }
  body.single-market .yb-market__meta-row .yb-article-meta{ margin: 0; gap: 10px; }
  body.single-market .yb-article-meta--below{ display: none !important; }
  body.single-market .yb-market__facts-title{ display: none !important; }
}
@media (max-width: 899px){
  body.single-market .yb-market__meta-row{ display: none !important; }
  body.single-market .yb-article-meta--below{ display: grid !important; }
}


/* Meta block placed inside content card (above TOC) */
.yb-market .yb-article-meta--incontent{
  margin: 0 0 14px;
}
.yb-market .yb-divider--incontent{
  margin: 10px 0 14px;
}

/* === FINAL OVERRIDES (Market only) === */
body.single-market #content.site-content,
body.single-market .site-content-inner{
  padding: 0 !important;
}
body.single-market .site-content-inner{
  max-width: none !important;
}
body.single-market .yb-market{
  margin-top: 0 !important;
}

/* Links card: no collapse styles needed */
.yb-market__links-title{
  margin: 0 0 14px;
}

/* Desktop: keep the in-block tiles hidden (tiles are in hero on desktop) */
@media (min-width: 900px){
  .yb-market__facts .yb-kf__tiles{ display:none !important; }
}

/* Mobile: hide the desktop-only list, show the details */
@media (max-width: 899px){
  .yb-market__facts .yb-kf__list{ display:none !important; }
}
@media (min-width: 900px){
  .yb-market__facts .yb-kf__more{ display:none !important; }
}

/* ===== FIX v9: TOC padding + English label + clean chevrons ===== */

/* TOC (LuckyWP Table of Contents) — style like single-coin and rename header */
body.single-market .lwptoc{
  background: rgba(15,23,42,.03);
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 16px;
  overflow: hidden;
}
body.single-market .lwptoc_header{
  padding: 14px 16px;
  background: rgba(15,23,42,.05);
}
body.single-market .lwptoc_items,
body.single-market .lwptoc_items_wrapper,
body.single-market .lwptoc_items_list{
  padding: 10px 16px 14px;
}

/* Rename header label (works even if plugin outputs "Содержание") */
body.single-market .lwptoc_header_label{ font-size:0 !important; }
body.single-market .lwptoc_header_label:before{
  content:"Table of Contents";
  font-size:22px;
  font-weight:900;
  letter-spacing:-0.02em;
}

/* Show-more chevron — replace weird icon with clean CSS arrow */
body.single-market .yb-kf__chev,
body.single-market .yb-links__chev,
body.single-market .yb-toc__chev{
  width:20px;
  height:20px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
body.single-market .yb-kf__chev:before,
body.single-market .yb-links__chev:before,
body.single-market .yb-toc__chev:before{
  content:"";
  width:8px;
  height:8px;
  border-right:2px solid #16a34a;
  border-bottom:2px solid #16a34a;
  transform: rotate(45deg);
  display:block;
}
/* when open -> up arrow */
body.single-market details[open] > summary .yb-kf__chev:before,
body.single-market details[open] > summary .yb-links__chev:before,
body.single-market details[open] > summary .yb-toc__chev:before{
  transform: rotate(-135deg);
}


/* === Market: Key Facts mobile tiles + clean "Show more" === */
@media (max-width: 768px){
  .yb-kf__list{ display:none !important; } /* hide desktop full list on mobile */
  .yb-market__hero-kf{ display:block !important; } /* keep tiles */
  .yb-kf__more{ display:block !important; margin-top:12px; }
}
@media (min-width: 769px){
  .yb-kf__more{ display:none !important; } /* desktop doesn't need Show more */
}

/* Make summary button look like a normal pill and remove default marker */
.yb-kf__more > summary{ list-style:none; cursor:pointer; }
.yb-kf__more > summary::-webkit-details-marker{ display:none; }
.yb-kf__more-btn{
  display:flex; align-items:center; justify-content:space-between;
  width:100%;
  padding:14px 16px;
  border:1px solid rgba(0,0,0,.08);
  border-radius:14px;
  background:#f3f3f3;
  font-weight:700;
}
.yb-kf__chev{
  width:10px; height:10px;
  border-right:2px solid #0ea14b;
  border-bottom:2px solid #0ea14b;
  transform: rotate(45deg);
  margin-left:12px;
}
.yb-kf__more[open] .yb-kf__chev{ transform: rotate(-135deg); }

.yb-kf__more-body{
  padding:12px 0 0;
}
.yb-kf__more-body .yb-kf__row{
  display:flex; justify-content:space-between; gap:12px;
  padding:10px 12px;
  border:1px solid rgba(0,0,0,.06);
  border-radius:12px;
  background:#fff;
  margin-bottom:10px;
}
.yb-kf__more-body .yb-kf__k{ color:#6b7280; font-weight:600; }
.yb-kf__more-body .yb-kf__v{ font-weight:700; }

/* === Market: TOC like coin + rename header label === */
.yb-market__content .lwptoc{
  background:#f3f3f3;
  border-radius:16px;
  padding:18px 18px;
  margin:0 0 18px;
}
.yb-market__content .lwptoc_header{
  padding:0;
  margin:0 0 10px;
}
.yb-market__content .lwptoc_header_label{
  font-size:0 !important;
}
.yb-market__content .lwptoc_header_label:before{
  content:"Table of Contents";
  font-size:18px;
  font-weight:800;
  color:#111827;
}
.yb-market__content .lwptoc_toggle{
  margin-left:10px;
}


/* =========================================================
   FIX: Content padding on mobile (match single-coin)
   The template uses <section class="yb-market__content"><div class="entry-content">...</div></section>
========================================================= */
body.single-market .yb-market__content{
  border: 1px solid var(--yb-border);
  background: var(--yb-card);
  border-radius: var(--yb-r);
  box-shadow: var(--yb-shadow-soft);
  padding: 16px;
  margin-top: 14px;
}

body.single-market .yb-market__content .entry-content{
  padding: 0 !important;
}

@media (max-width: 768px){
  body.single-market .yb-market__content{
    margin-left: 14px;
    margin-right: 14px;
  }
}

/* Ensure TOC inside content has comfortable inner padding */
body.single-market .yb-market__content .lwptoc{
  margin: 0 0 18px;
  padding: 18px 18px;
  border-radius: 16px;
}


/* =========================================================
   Market hero — match single-coin (layout + tiles)
========================================================= */
body.single-market .market-hero{
  border: 1px solid var(--yb-border);
  background: linear-gradient(135deg, rgba(22,163,74,.12), rgba(22,163,74,.04));
  border-radius: var(--yb-r);
  box-shadow: var(--yb-shadow-soft);
  padding: 16px;
  margin: 0 0 14px;
}

body.single-market .market-hero .coin-hero__top{
  display:flex;
  align-items:flex-start;
  gap: 14px;
}

body.single-market .market-hero .coin-hero__id{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width: 240px;
  flex: 1 1 auto;
}

body.single-market .market-hero .coin-hero__logo{
  width:56px;
  height:56px;
  border-radius:14px;
  background:#fff;
  border:1px solid var(--yb-border);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  flex: 0 0 56px;
}
body.single-market .market-hero .coin-hero__logo img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

body.single-market .market-hero .coin-hero__title .entry-title{
  margin:0;
  font-size: 28px;
  line-height: 1.1;
}

body.single-market .market-hero .coin-hero__badges{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 520px;
  max-width: 100%;
  flex: 0 0 auto;
}

body.single-market .market-hero .coin-badge{
  background: var(--yb-card);
  border: 1px solid var(--yb-border);
  border-radius: 16px;
  padding: 12px 12px;
  box-shadow: var(--yb-shadow-soft);
  min-height: 74px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

body.single-market .market-hero .coin-badge__k{
  font-size: 13px;
  color: var(--yb-muted);
  margin-bottom: 6px;
  display:flex;
  align-items:center;
  gap: 10px;
}

body.single-market .market-hero .coin-badge__k:before{
  content:"";
  width:34px;
  height:34px;
  border-radius: 12px;
  background: rgba(22,163,74,.10);
  border:2px solid rgba(22,163,74,.45);
  background-repeat:no-repeat;
  background-position:center;
  background-size:18px 18px;
  flex: 0 0 34px;
}

body.single-market .market-hero .coin-badge--rank .coin-badge__k:before{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2l2.5 6 6.5.6-5 4.1 1.5 6.3L12 16l-5.5 3 1.5-6.3-5-4.1 6.5-.6z'/%3E%3C/svg%3E");
}
body.single-market .market-hero .coin-badge--vol .coin-badge__k:before{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19V5'/%3E%3Cpath d='M8 19V9'/%3E%3Cpath d='M12 19V3'/%3E%3Cpath d='M16 19v-7'/%3E%3Cpath d='M20 19v-11'/%3E%3C/svg%3E");
}
body.single-market .market-hero .coin-badge--country .coin-badge__k:before{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V7l-8-5-8 5v5c0 6 8 10 8 10z'/%3E%3C/svg%3E");
}
body.single-market .market-hero .coin-badge--year .coin-badge__k:before{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='3'/%3E%3Cpath d='M16 2v4'/%3E%3Cpath d='M8 2v4'/%3E%3Cpath d='M3 10h18'/%3E%3C/svg%3E");
}

body.single-market .market-hero .coin-badge__v{
  font-weight: 800;
  font-size: 18px;
  color: var(--yb-text);
  line-height: 1.1;
  padding-left: 44px; /* align with icon */
}

@media (max-width: 900px){
  body.single-market .market-hero .coin-hero__top{
    flex-direction:column;
  }
  body.single-market .market-hero .coin-hero__badges{
    width:100%;
  }
}

@media (max-width: 520px){
  body.single-market .market-hero{
    padding: 14px;
    margin-left: 14px;
    margin-right: 14px;
  }
  body.single-market .market-hero .coin-hero__title .entry-title{
    font-size: 24px;
  }
  body.single-market .market-hero .coin-hero__badges{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  body.single-market .market-hero .coin-badge{
    min-height: 70px;
    padding: 10px;
  }
  body.single-market .market-hero .coin-badge__v{
    font-size: 16px;
  }
}
\n
/* =========================================================
   FIX: add spacing between header and market hero
========================================================= */
body.single-market .yb-market-hero{
  margin-top: 16px;
}

@media (max-width: 768px){
  body.single-market .yb-market-hero{
    margin-top: 12px;
  }
}


/* =========================================================
   FIX: space between header and market hero (correct selector)
========================================================= */
body.single-market .market-hero{
  margin-top: 16px;
}
@media (max-width: 768px){
  body.single-market .market-hero{
    margin-top: 12px;
  }
}

/* =========================================================
   Key Facts: show ONLY Website tile (single column)
========================================================= */
body.single-market .yb-kf__tiles--single{
  display:grid;
  grid-template-columns: 1fr !important;
  gap: 12px;
}
body.single-market .yb-kf__tiles--single .yb-kf__tile{
  width:100%;
}


/* =========================================================
   FIX: Desktop hero badges in ONE ROW (match single-coin)
========================================================= */
@media (min-width: 1024px){
  body.single-market .market-hero .coin-hero__top{
    align-items:center;
  }
  body.single-market .market-hero .coin-hero__id{
    flex:0 0 auto;
    min-width: 260px;
  }
  body.single-market .market-hero .coin-hero__badges{
    width: auto;
    flex: 1 1 auto;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Key Facts: website-only tile fills card nicely */
body.single-market .yb-market__card--facts .yb-kf__tiles--single{
  grid-template-columns: 1fr;
}


/* =========================================================
   Market: [yb_trending] inside right column — force vertical stack
========================================================= */
body.single-market .yb-market__card--trending .yb-trending-block{
  margin: 0 !important;
}
body.single-market .yb-market__card--trending .yb-trending-grid{
  grid-template-columns: 1fr !important;
}

/* HARD FIX: force [yb_trending] to vertical stack */
.yb-market__card--trending .yb-trending-grid{
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  gap: 14px !important;
}

.yb-market__card--trending .yb-trending-grid > .yb-trending-card{
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 auto !important;
}

/* на всякий случай: если где-то задано grid/columns */
.yb-market__card--trending .yb-trending-grid{
  grid-template-columns: 1fr !important;
  columns: 1 !important;
}

/* убрать горизонтальный скролл если появляется */
.yb-market__card--trending .yb-trending-block,
.yb-market__card--trending .yb-trending-grid{
  overflow-x: hidden !important;
}
/* =========================================================
   FIX: Market Coverage values not visible on mobile
   Reason: some mobile styles/overlaps can hide trailing inline content.
   We force a 3-column flex row (dot | label | value) with explicit colors.
   ========================================================= */
body.single-market .yb-market__card--facts .yb-market__coverage{
  margin-top: 8px;
}
body.single-market .yb-market__card--facts .yb-coverage-row{
  display:flex !important;
  align-items:center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  flex-wrap: nowrap !important;
  min-width: 0 !important;
}
body.single-market .yb-market__card--facts .yb-coverage-dot{
  flex: 0 0 10px !important;
}
body.single-market .yb-market__card--facts .yb-coverage-label{
  flex: 1 1 auto !important;
  min-width: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  color: var(--yb-text) !important;
  opacity: .92 !important;
}
body.single-market .yb-market__card--facts .yb-coverage-value{
  flex: 0 0 auto !important;
  margin-left: auto !important;
  white-space: nowrap !important;
  display: inline-block !important;
  color: var(--yb-text) !important;
  font-weight: 900 !important;
  font-variant-numeric: tabular-nums !important;
}

/* Light/Dark border consistency for coverage rows */
body.single-market .yb-market__card--facts .yb-coverage-row{
  border-top-color: var(--yb-border) !important;
}

/* Also prevent horizontal clipping on market pages (mobile) */
body.single-market,
body.single-market #page.site,
body.single-market .site,
body.single-market .site-content,
body.single-market #content.site-content,
body.single-market .yb-market{
  overflow-x: hidden !important;
}


/* =========================================================
   Market hero: Aggregate rating / CTA next to title
   Works with markup classes:
   - .yb-hero-rating (wrapper)
   - a.yb-agg-rating (CTA "⭐ Rate it")
   ========================================================= */

body.single-market .market-hero .coin-hero__title .entry-title{
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

body.single-market .market-hero .yb-hero-rating{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
}

body.single-market .market-hero .yb-hero-rating a{
  color: var(--yb-link);
  text-decoration: none;
}

body.single-market .market-hero .yb-hero-rating a:hover{
  color: var(--yb-link2);
  text-decoration: underline;
}

/* CTA look */
body.single-market .market-hero a.yb-agg-rating{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--yb-border);
  background: var(--yb-surface);
  font-weight: 900;
  font-size: 13px;
  line-height: 1.1;
}

body.single-market .market-hero a.yb-agg-rating:hover{
  border-color: rgba(34,197,94,.35);
  background: rgba(34,197,94,.10);
}
