/* tg-price — редизайн .offsetprice, разметка/класс без изменений */
.page-content table.offsetprice{
  width:100%; max-width:100%; table-layout:auto;
  border-collapse:separate; border-spacing:0;
  margin:28px 0 20px;
  font-family:'Manrope',Arial,sans-serif;
  border:1px solid #e7e8ea; border-radius:16px;
  overflow:hidden;
}

/* гасим «мусорные» инлайн width:210px и т.п. из WYSIWYG-контента */
.page-content table.offsetprice td[style*="width"]{
  width:auto !important;
}

/* строка 1 в разметке = шапка (родного <thead> в контенте нет) */
.page-content table.offsetprice tr:first-child td{
  background:#ffce00; color:#0a0a0a;
  font-weight:700; font-size:14px; line-height:1.3; letter-spacing:.01em;
  padding:16px 18px; border-top:none; vertical-align:middle;
}
.page-content table.offsetprice tr:first-child td:first-child{border-top-left-radius:15px}
.page-content table.offsetprice tr:first-child td:last-child{border-top-right-radius:15px}

/* под-шапка матричных таблиц (afishes/tablichki) — строка с colspan */
.page-content table.offsetprice tr:has(td[colspan]) td{
  background:rgba(255,206,0,.14) !important; color:#0a0a0a;
  font-weight:700; font-size:13px; padding:9px 18px; border-top:none;
}

.page-content table.offsetprice td{
  padding:14px 18px; font-size:15px; line-height:1.4; color:#1c1f24;
  text-align:center; vertical-align:middle; border-top:1px solid #e7e8ea;
}
.page-content table.offsetprice tr:nth-child(2) td{border-top:none}

/* зебра — на TD, не на TR: нужно для sticky-колонки на мобильном */
.page-content table.offsetprice tr:nth-child(even) td{background:#fafafa}
.page-content table.offsetprice tr:nth-child(odd) td{background:#ffffff}
.page-content table.offsetprice tr:first-child td{background:#ffce00 !important}

.page-content table.offsetprice td:first-child{
  font-weight:600; color:#0a0a0a; text-align:left;
}
.page-content table.offsetprice td:not(:first-child):not(:last-child){
  color:#5b6068; font-weight:400;
}
.page-content table.offsetprice td:last-child{
  font-weight:700; font-size:16px; color:#0a0a0a; font-variant-numeric:tabular-nums;
}

/* сноска (* примечание) сразу под таблицей */
.page-content table.offsetprice + p{
  margin:12px 0 32px; padding-left:14px; border-left:2px solid #e7e8ea;
  font-size:13px; line-height:1.6; color:#5b6068;
}

/* ── мобайл ≤639px: скролл внутри таблицы, страница не расширяется ── */
@media(max-width:639px){
  .page-content table.offsetprice{
    display:block; overflow-x:auto; -webkit-overflow-scrolling:touch; border-radius:14px;
  }
  .page-content table.offsetprice > tbody{
    display:table; width:100%; min-width:540px;
  }
  .page-content table.offsetprice td{padding:12px 14px; font-size:14px}
  .page-content table.offsetprice td:last-child{font-size:15px}
  .page-content table.offsetprice td:first-child{
    position:sticky; left:0; z-index:1; box-shadow:1px 0 0 #e7e8ea;
  }
}

/* a11y: первая строка промоутится в <th scope="col"> (tg-price.js) — паритет стилей с td-шапкой.
   Если JS не сработал, строка остаётся td и её стилят правила выше — визуально идентично. */
.page-content table.offsetprice tr:first-child th{
  background:#ffce00 !important; color:#0a0a0a;
  font-weight:700; font-size:14px; line-height:1.3; letter-spacing:.01em;
  padding:16px 18px; border-top:none; vertical-align:middle; text-align:center;
}
.page-content table.offsetprice tr:first-child th:first-child{border-top-left-radius:15px; text-align:left}
.page-content table.offsetprice tr:first-child th:last-child{border-top-right-radius:15px}
@media(max-width:639px){
  .page-content table.offsetprice tr:first-child th{padding:12px 14px}
  .page-content table.offsetprice th:first-child{
    position:sticky; left:0; z-index:1; box-shadow:1px 0 0 #e7e8ea;
  }
}
