/* RUS.DO — «Петиции». Прогресс teal → coral на цели, спокойные карточки. Только токены (тёмная тема из app.css). */
.pt-page { padding-top: var(--s-4); padding-bottom: var(--s-7); }

/* Шапка */
.pt-head p { max-width: 640px; color: var(--ink-2); }
.pt-stats { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); margin-top: var(--s-3); list-style: none; padding: 0; font-size: var(--fs-sm); color: var(--ink-3); }
.pt-stats b { color: var(--ink); font-weight: 800; font-size: var(--fs-md); }

.pt-banner { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) var(--s-4); border-radius: var(--r-sm); margin-bottom: var(--s-4); font-size: var(--fs-sm); background: var(--amber-50); color: var(--ink); }
.pt-banner > .i { color: var(--amber); flex: none; }
.pt-banner--hidden { background: var(--coral-50); }
.pt-banner--hidden > .i { color: var(--coral-600); }

/* Фильтры */
.pt-filter { display: flex; gap: var(--s-3); align-items: center; margin-bottom: var(--s-5); flex-wrap: wrap; }
.pt-filter .chips--scroll { flex: 1; min-width: 0; margin: 0; padding: 2px 0; }
.pt-filter .chip { white-space: nowrap; flex: none; }
.pt-tabs { display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line); flex: none; }
.pt-tabs a { padding: 7px 16px; border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 700; color: var(--ink-2); text-decoration: none; }
.pt-tabs a.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

/* Статусы */
.pt-status { gap: 5px; }
.pt-pill--sent { background: var(--palm-50); color: var(--palm); }
.pt-pill--closed { background: var(--surface-2); color: var(--ink-3); }

/* Карточки */
.pt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
.pt-card { position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 0; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease); }
.pt-card:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.pt-card__media { position: relative; aspect-ratio: 16 / 7; background: linear-gradient(135deg, var(--teal-50), var(--coral-50)); }
.pt-card__media { overflow: hidden; }
.pt-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pt-card__ic { position: absolute; inset: 0; display: grid; place-items: center; color: var(--teal-600); }
.pt-card__ic .i { width: 44px; height: 44px; }
.pt-card__media .pt-status { position: absolute; top: 12px; left: 12px; box-shadow: var(--shadow-1); }
.pt-card__media img + .pt-status { background: var(--surface); }
.pt-card__body { flex: 1; display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-4); }
.pt-card h3 { font-size: var(--fs-md); line-height: 1.3; }
.pt-card h3 a { color: var(--ink); text-decoration: none; }
.pt-card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.pt-card h3 a:hover { color: var(--teal-600); }
.pt-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.pt-card__foot > * { position: relative; z-index: 1; }

.pt-meta { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: var(--fs-xs); color: var(--ink-3); }
.pt-meta li { display: flex; gap: 6px; align-items: flex-start; min-width: 0; }
.pt-meta .i { flex: none; margin-top: 2px; color: var(--ink-4); }
.pt-meta span { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }

/* Прогресс: teal во время сбора, coral при достижении цели */
.pt-prog { display: grid; gap: 6px; }
.pt-prog__bar { height: 8px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.pt-prog__bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal-600), var(--teal)); transition: width var(--dur-2) var(--ease); }
.pt-prog.is-done .pt-prog__bar span { background: linear-gradient(90deg, var(--teal), var(--coral)); }
.pt-prog__nums { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-2); font-size: var(--fs-sm); }
.pt-prog__nums b { font-weight: 800; color: var(--ink); }
.pt-prog.is-done .pt-prog__nums .muted { color: var(--coral-600); font-weight: 700; }
.pt-prog--big .pt-prog__bar { height: 12px; }
.pt-prog--big .pt-prog__nums b { font-size: var(--fs-xl); letter-spacing: -.02em; }

.pt-sign.is-on { box-shadow: none; }

/* Как это работает */
.pt-how { margin-top: var(--s-7); }
.pt-how h2 { font-size: var(--fs-xl); margin-bottom: var(--s-4); }
.pt-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); counter-reset: s; }
.pt-steps li { display: grid; gap: var(--s-3); align-content: start; }
.pt-steps__n { position: relative; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--teal-50); color: var(--teal-600); }
.pt-steps li:nth-child(even) .pt-steps__n { background: var(--coral-50); color: var(--coral-600); }
.pt-steps__n b { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: var(--teal); border: 2px solid var(--surface); }
.pt-steps li:nth-child(even) .pt-steps__n b { background: var(--coral); }
.pt-steps h3 { font-size: var(--fs-md); margin-bottom: 4px; }
.pt-steps p { font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.5; }

.pt-fab { display: none; }

/* Страница петиции */
.pt-detail { align-items: start; }
.pt-main { display: grid; gap: var(--s-4); min-width: 0; }
.pt-cover-img { width: 100%; height: auto; aspect-ratio: 16 / 6; object-fit: cover; border-radius: var(--r-lg); display: block; }
.pt-hero { display: grid; gap: var(--s-3); justify-items: start; }
.pt-hero h1 { font-size: var(--fs-2xl); line-height: 1.15; letter-spacing: -.02em; }
.pt-facts { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-3); width: 100%; }
.pt-facts li { display: flex; gap: var(--s-3); align-items: flex-start; }
.pt-facts li > .i { color: var(--teal-600); flex: none; margin-top: 3px; }
.pt-facts .pt-facts__v { display: block; }
.pt-facts > li > span { display: grid; gap: 2px; min-width: 0; }
.pt-facts small { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.pt-facts a:not(.ulink) { font-size: var(--fs-sm); font-weight: 700; color: var(--teal-700); }

.pt-hero__m { display: none; gap: var(--s-3); width: 100%; padding-top: var(--s-3); border-top: 1px solid var(--line); }
.pt-sec h2 { font-size: var(--fs-lg); margin-bottom: var(--s-3); }

/* Лента новостей */
.pt-timeline { list-style: none; padding: 0 0 0 var(--s-4); margin: 0; border-left: 2px solid var(--line-2); display: grid; gap: var(--s-4); }
.pt-timeline li { position: relative; }
.pt-timeline li::before { content: ""; position: absolute; left: calc(-1 * var(--s-4) - 7px); top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--teal); border: 2px solid var(--surface); }
.pt-timeline__start::before { background: var(--ink-4) !important; }
.pt-timeline__meta { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-sm); margin-bottom: 4px; }
.pt-timeline__meta time { color: var(--ink-3); }
.pt-upd-form { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px dashed var(--line-2); }

/* Подписавшие */
.pt-signers { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3) var(--s-4); }
.pt-signers li { display: flex; gap: var(--s-3); align-items: flex-start; min-width: 0; }
.pt-signers li > div { min-width: 0; }
.pt-signers__n { display: flex; flex-wrap: wrap; gap: 2px var(--s-2); align-items: baseline; font-size: var(--fs-sm); }
.pt-signers__n .muted { font-size: var(--fs-xs); }
.pt-signers__c { margin-top: 2px; font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.45; overflow-wrap: anywhere; }
.pt-signers__more { margin-top: var(--s-3); font-size: var(--fs-sm); }

/* Письмо */
.pt-letter__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); flex-wrap: wrap; }
.pt-letter__head .muted { font-size: var(--fs-xs); }
.pt-letter > .muted { font-size: var(--fs-sm); margin-bottom: var(--s-3); }
.pt-letter__txt { white-space: pre-wrap; overflow-wrap: anywhere; font: 14px/1.6 ui-serif, Georgia, "Times New Roman", serif; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--s-4); max-height: 420px; overflow: auto; margin: 0 0 var(--s-3); }

/* Боковая панель */
.pt-side__in { display: grid; gap: var(--s-4); }
.pt-signbox { display: grid; gap: var(--s-3); }
.pt-left { font-size: var(--fs-sm); color: var(--ink-2); font-weight: 600; }
.pt-done { display: flex; gap: var(--s-2); align-items: center; font-weight: 700; color: var(--coral-600); }
.pt-comment { display: grid; gap: var(--s-2); padding-top: var(--s-3); border-top: 1px solid var(--line); }
.pt-comment textarea { width: 100%; resize: vertical; min-height: 64px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-sm); }
.pt-comment textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px var(--teal-50); }
.pt-comment .check { font-size: var(--fs-xs); color: var(--ink-2); }
.pt-comment .btn { justify-self: start; }
.pt-share { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.pt-dl { justify-self: start; display: inline-flex; gap: 6px; align-items: center; }
.pt-manage h2 { font-size: var(--fs-md); margin-bottom: var(--s-3); }
.pt-manage__st { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }

/* Форма */
.pt-form .chips { gap: var(--s-2); }
.pt-es { border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--s-3) var(--s-4); background: var(--surface-2); }
.pt-es summary { cursor: pointer; font-weight: 700; font-size: var(--fs-sm); color: var(--teal-700); }
.pt-es[open] summary { margin-bottom: var(--s-3); }
.pt-covers { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: var(--s-2); }
.pt-cover { position: relative; display: grid; border-radius: var(--r-sm); overflow: hidden; border: 2px solid var(--line); cursor: pointer; aspect-ratio: 4 / 3; background: var(--surface-2); }
.pt-cover input { position: absolute; opacity: 0; pointer-events: none; }
.pt-cover img { width: 100%; height: 100%; object-fit: cover; grid-area: 1 / 1; }
.pt-cover span { grid-area: 1 / 1; align-self: end; padding: 4px 8px; font-size: 12px; font-weight: 700; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); }
.pt-cover--none span { align-self: center; justify-self: center; background: none; color: var(--ink-2); }
.pt-cover:has(input:checked) { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-50); }
.pt-cover:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Адаптив */
@media (max-width: 1080px) {
  .pt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pt-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1024px) {
  .pt-side .sticky { position: static; }
  .pt-detail { display: flex; flex-direction: column; gap: var(--s-4); }
  .pt-hero__m { display: grid; }
  .pt-detail > .pt-side { width: 100%; }
}
@media (max-width: 720px) {
  .pt-grid { grid-template-columns: 1fr; gap: var(--s-3); }
  .pt-head .btn--primary { display: none; }
  .pt-fab { display: inline-flex; position: fixed; right: 16px; bottom: calc(var(--bnav-h) + 16px + env(safe-area-inset-bottom, 0px)); z-index: var(--z-nav); width: 56px; height: 56px; padding: 0; border-radius: 50%; justify-content: center; }
  .pt-filter { flex-direction: column; align-items: stretch; }
  .pt-tabs { align-self: flex-start; }
  .pt-hero h1 { font-size: var(--fs-xl); }
  .pt-signers { grid-template-columns: 1fr; }
  .pt-cover-img { border-radius: var(--r); aspect-ratio: 16 / 8; }
  .pt-how { margin-top: var(--s-6); }
}
@media (max-width: 420px) {
  .pt-steps { grid-template-columns: 1fr; }
}
