/* TEX-195. Звернення «Ви дочитали до кінця…» в кінці матеріалу (template-parts/single/support-block.php).
   Перенесено з прототипу Наталії (sage-brigadeiros-5e5f57.netlify.app) без змін у вигляді.
   Картка на 40px ширша за колонку тексту з кожного боку, текст — рівно по краю статті. */

.tum-support {
  --serif: BlackerProText, Georgia, "Times New Roman", serif;
  --sans: e-Ukrainer, "Helvetica Neue", Arial, sans-serif;
  --ink: #000; --text: #262626; --muted: #525252; --soft: #737373;
  --line: #e5e5e5; --panel: #fafafa; --yellow: #fff377;
  /* Ширина колонки тексту — як у .single-article .content p (css/single.css) */
  --col: 678px; --gut: 32px;
  margin: 48px 0 0; color: var(--text); font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
@media (max-width: 1439px) { .tum-support { --col: 610px; } }
@media (max-width: 1024px) { .tum-support { --col: 698px; } }
@media (max-width: 767px)  { .tum-support { --gut: 16px; } }
.tum-support *, .tum-support *::before, .tum-support *::after { box-sizing: border-box; }
/* single.css ставить «.single-article * { font-family: BlackerProText }» кожному тегу: у блоці шрифт успадковується,
   а свої шрифти задають класи нижче (та сама вага селектора, але цей файл підключено пізніше) */
.tum-support * { font-family: inherit; }

.tum-support__inner { --cardw: calc(var(--col) + 80px);
  width: min(var(--cardw), 100%); margin: 0 auto;
  padding: 48px max(var(--gut), calc((min(var(--cardw), 100%) - var(--col)) / 2)) 40px;
  background: var(--panel); border-top: 3px solid var(--yellow); }
.tum-support .tum-support__title { font: 500 30px/1.15 var(--serif); color: var(--ink); margin: 0 0 18px; padding: 0; letter-spacing: normal; text-transform: none; }
.tum-support p { font: 300 18px/1.5 var(--serif); /* як основний текст статті (.single-article .content p): читається як продовження */ color: var(--text); margin: 0 0 16px; padding: 0; max-width: none; }
/* Лист — без antialiased, як стаття: на Маку antialiased робить текст помітно тоншим */
.tum-support .tum-support__title, .tum-support__inner > p { -webkit-font-smoothing: auto; }
.tum-support p strong { font-weight: 600; font-synthesis: none; color: var(--ink); }
.tum-support .tum-support__cta { font-weight: 600; font-synthesis: none; color: var(--ink); }
.tum-support__cta mark { background: var(--yellow); color: inherit; padding: .14em 3px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* Рівні підтримки: за зростанням ціни; обрано найдешевший, а digital & print відкритий — з перевагами й обкладинкою.
   Шрифти, кольори й рамки — з Figma (не з прототипу): усе e-Ukraine, описи Regular, ціна Medium */
.tum-tiers { display: grid; gap: 8px; margin: 28px 0 0; }
.tum-tier { position: relative; display: grid; grid-template-columns: 14px minmax(0, 1fr) auto;
  grid-template-areas: "dot name price" "dot desc desc"; column-gap: 12px; row-gap: 3px; align-items: start;
  margin: 0; padding: 15px 18px 14px; background: #fff; border-radius: 2px; cursor: pointer;
  box-shadow: inset 0 0 0 0.5px #cdcbcb; transition: box-shadow .15s ease, background-color .15s ease; }
.tum-tier input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; margin: 0; }
.tum-tier:hover { box-shadow: inset 0 0 0 1px #a3a3a3; }
.tum-tier.is-checked { background: #fffef1; box-shadow: inset 0 0 0 1.5px #171717; }
/* Рамка фокусу лише з клавіатури: сам input прихований */
.tum-tier:has(input:focus-visible) { outline: 2px solid #000; outline-offset: 3px; }
.tum-tier__dot { grid-area: dot; width: 14px; height: 14px; margin-top: 2px; border-radius: 50%; background: #fff;
  box-shadow: inset 0 0 0 1px #c8c8c8; transition: box-shadow .15s ease, background .15s ease; }
.tum-tier:hover .tum-tier__dot { box-shadow: inset 0 0 0 1px #8a8a8a; }
.tum-tier.is-checked .tum-tier__dot { box-shadow: inset 0 0 0 1.25px #000;
  background: radial-gradient(circle, #000 0 2.75px, transparent 3.35px), #fff; }
.tum-tier__name { grid-area: name; font: 500 15px/18.2px var(--sans); color: #353535; text-wrap: balance; }
.tum-tier__price { grid-area: price; display: flex; align-items: baseline; gap: 2px; margin-top: -1px; white-space: nowrap;
  font: 500 21px/1 var(--sans); color: var(--ink); letter-spacing: -0.01em; }
.tum-tier__price small { font: 400 11px/1 var(--sans); color: var(--muted); letter-spacing: 0; }
.tum-tier__desc { grid-area: desc; margin-top: 9px; padding-top: 11px; border-top: 1px solid rgba(0,0,0,.08);
  font: 400 12.5px/1.5 var(--sans); color: #525252; }
.tum-tier__pop { display: inline-block; margin-left: 6px; padding: 3px 7px; border-radius: 2px; white-space: nowrap;
  vertical-align: 1px; background: var(--yellow); color: var(--ink); font: 400 12px/1.25 var(--sans); }
.tum-tier--open { grid-template-areas: "dot name price" "dot perks perks"; padding-top: 17px; padding-bottom: 16px; overflow: hidden; }
.tum-tier--open .tum-tier__name, .tum-tier--open .tum-tier__price, .tum-tier__perks { position: relative; z-index: 1; }
/* Обкладинка Reporters виглядає з-за нижнього краю картки; при першій появі рівнів плавно виїжджає */
.tum-tier__cover { position: absolute; right: 28px; bottom: -58px; z-index: 0; width: 108px; height: auto; max-width: none; border-radius: 2px;
  transform: translateY(34px) rotate(5deg); transform-origin: 50% 100%; pointer-events: none;
  box-shadow: 0 12px 26px rgba(0,0,0,.20), 0 2px 5px rgba(0,0,0,.16);
  transition: transform .8s cubic-bezier(.2,.8,.2,1) .2s; }
.tum-tiers.is-in .tum-tier__cover { transform: translateY(0) rotate(5deg); }
.tum-tiers.is-in .tum-tier--open:hover .tum-tier__cover { transform: translateY(-8px) rotate(3deg); transition-duration: .35s; transition-delay: 0s; }
.tum-tier__perks { grid-area: perks; display: grid; gap: 6px; margin-top: 9px; padding-top: 11px; border-top: 1px solid rgba(0,0,0,.08); }
.tum-tier__perk { position: relative; padding-left: 23px; font: 400 12.5px/1.5 var(--sans); color: #525252; }
/* Галочка — як на сторінці Спільноти; колір — як у тексту перків */
.tum-tier__perk::before { content: ""; position: absolute; left: 0; top: 2px; width: 14px; height: 14px;
  background: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.52036 12.0537C4.12296 12.0538 3.74183 11.8959 3.46106 11.6146L0.258452 8.4132C-0.0861507 8.06849 -0.0861507 7.50971 0.258452 7.165C0.603165 6.82039 1.16194 6.82039 1.50666 7.165L4.52036 10.1787L12.4933 2.20572C12.8381 1.86111 13.3968 1.86111 13.7415 2.20572C14.0862 2.55043 14.0862 3.10921 13.7415 3.45392L5.57966 11.6146C5.29889 11.8959 4.91776 12.0538 4.52036 12.0537Z' fill='%23525252'/%3E%3C/svg%3E") center / contain no-repeat; }
.tum-tier__perk a { color: inherit; text-decoration: underline; text-decoration-color: rgba(0,0,0,.35);
  text-decoration-thickness: 1px; text-underline-offset: 2px; transition: text-decoration-color .15s; }
.tum-tier__perk a:hover { color: inherit; text-decoration-color: #000; }
/* Коментарі Наталії #12, #13, #15, #16: у вибраній картці текст темний (#282828), у решти — сірий (#525252) */
.tum-tier.is-checked .tum-tier__desc, .tum-tier.is-checked .tum-tier__perk { color: #282828; }
.tum-tier.is-checked .tum-tier__perk::before { background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.52036 12.0537C4.12296 12.0538 3.74183 11.8959 3.46106 11.6146L0.258452 8.4132C-0.0861507 8.06849 -0.0861507 7.50971 0.258452 7.165C0.603165 6.82039 1.16194 6.82039 1.50666 7.165L4.52036 10.1787L12.4933 2.20572C12.8381 1.86111 13.3968 1.86111 13.7415 2.20572C14.0862 2.55043 14.0862 3.10921 13.7415 3.45392L5.57966 11.6146C5.29889 11.8959 4.91776 12.0538 4.52036 12.0537Z' fill='%23282828'/%3E%3C/svg%3E"); }
.tum-support .t-mob, .tum-support .br-mob { display: none; }

/* Шкала кампанії: скільки вже є, скільки лишилося днів; смуга поділена на сотні (мета 400 = 4 відрізки) */
.tum-goal { --goal-bg: #fff; margin: 6px 0 28px; padding: 16px 18px 18px; border-radius: 4px;
  background: var(--goal-bg); box-shadow: inset 0 0 0 1px var(--line); }
.tum-goal__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.tum-goal__count { min-width: 0; white-space: nowrap; font: 300 14px/1.3 var(--sans); color: var(--text); }
.tum-goal__count b { display: inline-block; font-weight: 600; font-synthesis: none; color: var(--ink); }
.tum-goal__days { white-space: nowrap; font: 300 13px/1.3 var(--sans); color: var(--muted); }
.tum-goal__track { position: relative; height: 7px; margin-top: 12px; border-radius: 2px; overflow: hidden; background: #dcdcd9; }
.tum-goal__fill { position: absolute; left: 0; top: 0; bottom: 0; z-index: 1; border-radius: 2px; background: #5e5e5e;
  transition: width 1.6s cubic-bezier(.22,.8,.24,1); }
.tum-goal__seg { position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, transparent calc(25% - 1px), var(--goal-bg) 0 calc(25% + 1px),
    transparent 0 calc(50% - 1px), var(--goal-bg) 0 calc(50% + 1px),
    transparent 0 calc(75% - 1px), var(--goal-bg) 0 calc(75% + 1px), transparent 0); }

/* Обличчя учасників + лічильник Спільноти */
.tum-proof { display: flex; align-items: center; gap: 12px; margin: 28px 0 18px; }
.tum-proof__faces { display: flex; flex: none; }
.tum-proof__faces img { width: 32px; height: 32px; max-width: none; border-radius: 50%; border: 2px solid var(--panel);
  margin-left: -8px; object-fit: cover; display: block; background: #e5e5e5; }
.tum-proof__faces img:first-child { margin-left: 0; }
.tum-proof.is-ready .tum-proof__faces img { opacity: 0; transform: translateX(-6px); transition: opacity .45s ease, transform .45s ease; }
.tum-proof.is-in .tum-proof__faces img { opacity: 1; transform: none; }
.tum-support .tum-proof__text { font: 400 13px/1.4 var(--sans); color: var(--muted); margin: 0; }
.tum-support .tum-proof__text b { font-weight: 500; color: var(--ink); }

/* Кнопка */
.tum-support__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
/* Кнопка — як компонент Button у Figma: 300×44, e-Ukraine 15px Regular, без іконки */
.tum-support .tum-btn { display: inline-flex; align-items: center; justify-content: center; width: 300px; max-width: 100%; min-height: 44px;
  padding: 10px; border-radius: 2px; font: 400 15px/1.4 var(--sans); text-align: center; text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s; }
.tum-support .tum-btn--primary { background: #000; color: #fff; border: 1px solid #000; }
.tum-support .tum-btn--primary:hover, .tum-support .tum-btn--primary:focus-visible { background: #262626; color: #fff; }
.tum-support__fine { font: 300 11px/1.4 var(--sans); color: var(--soft); margin-top: 10px; letter-spacing: .01em; }

@media (max-width: 820px) {
  .tum-support__inner { padding: 40px max(16px, calc((100% - var(--col)) / 2)) 36px; }
}
@media (max-width: 767px) {
  .tum-support__inner { width: 100%; padding: 40px 16px 36px; }
  .tum-support .tum-support__title { font-size: 26px; }
  .tum-support__actions { flex-direction: column; align-items: stretch; }
  .tum-support .tum-btn { width: 100%; }
  .tum-goal { padding: 14px 14px 16px; }
  .tum-support .t-mob, .tum-support .br-mob { display: inline; }
  .tum-support .t-desk { display: none; }
  .tum-tier { column-gap: 10px; padding: 14px 14px 13px; }
  .tum-tier--open { padding-top: 16px; padding-bottom: 15px; }
  .tum-tier__pop { display: table; margin: 5px 0 0; }
  .tum-tier__price { font-size: 20px; gap: 3px; }
  .tum-tier__cover { width: 62px; right: 16px; bottom: -35px; }
}
/* Дуже вузькі екрани: 7 облич трохи менші, щоб підпис не розсипався на 3+ рядки */
@media (max-width: 359px) {
  .tum-proof__faces img { width: 28px; height: 28px; margin-left: -9px; }
  .tum-tier__cover { width: 52px; right: 10px; bottom: -29px; }
}
@media (prefers-reduced-motion: reduce) {
  .tum-tier__cover, .tum-goal__fill { transition: none; }
  .tum-proof.is-ready .tum-proof__faces img { opacity: 1; transform: none; transition: none; }
}
