/* The shared parts of «Аналитика сайта» (web/site-stats.js): the period switch, «Сегодня», «Кто оплатил», «Ссылки для
   рекламы». Phone first: one column, the sum and the time on a payment's first line, a link's address with a wide copy
   button; the period switch sits above the bottom menu, under the thumb. */
.sst-period { min-width: 0; }
.sst-period .segmented { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); width: 100%; }
.sst-period .segmented button { min-height: 40px; padding: 0 6px; white-space: nowrap; font-size: 14px; }
@media (max-width: 959px) {
  .sst-period { position: fixed; z-index: 25; left: 0; right: 0; bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom)); padding: 8px var(--gutter);
    border-top: 1px solid var(--line); background: rgb(22 22 24 / .96); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
  .sst-period .segmented button { min-height: 44px; }
  /* The fixed switch covers the page's last lines otherwise; the toast rises above it. */
  .sst-page { padding-bottom: 64px; }
  body:has(.sst-period) #toast { bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 76px); }
}

/* «Сегодня»: the money across the card, three figures under it; yesterday at the same time under each. */
.sst-today { --sins-accent: 57 135 229; display: grid; gap: 12px; min-width: 0; --muted: #a3a3ad; }
.sst-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sst-tile { display: grid; align-content: start; gap: 2px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel-2); }
.sst-tile > span { color: var(--muted); font-size: 13px; }
.sst-tile strong { font-size: 24px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sst-tile small { font-size: 12px; line-height: 1.35; }
.sst-tile.is-money { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; }
.sst-tile.is-money > span, .sst-tile.is-money strong { grid-column: 1; }
.sst-tile.is-money strong { font-size: 32px; }
.sst-tile.is-money small { grid-column: 1 / -1; }
.sst-then { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; color: var(--muted); }
.sst-then .site-change { font-size: 12px; }
.sst-hours-wrap { display: grid; gap: 4px; }
.sst-hours-title { margin: 0; color: var(--muted); font-size: 13px; }
.sst-hours { display: block; width: 100%; height: auto; overflow: visible; }
.sst-bar { fill: rgb(var(--sins-accent) / .75); }
.sst-hour.is-now .sst-bar { fill: rgb(var(--sins-accent)); }
.sst-bar-y { fill: rgb(255 255 255 / .1); }
@media (max-width: 380px) { .sst-tile strong { font-size: 21px; } .sst-tile { padding: 9px 8px; } .sst-tile > span { font-size: 12px; } }

/* «Кто оплатил»: a payment in three short lines, the sum first. */
.sst-paid, .sst-links { display: grid; gap: 12px; min-width: 0; --muted: #a3a3ad; }
.sst-paid-sum { margin: 0; font-size: 15px; }
.sst-pays, .sst-link-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sst-pay { display: grid; gap: 4px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel-2); }
.sst-pay-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.sst-pay-money { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.sst-pay-sum { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sst-pay-usd, .sst-pay-when { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.sst-pay-line { margin: 0; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.sst-pay-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 2px 0 0; font-size: 13px; }
.sst-pay-tags .pill { font-size: 12px; }
.sst-pay-link { color: var(--text); }
.sst-flag { font-family: 'Twemoji Country Flags', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif; }
.sst-more { justify-self: start; min-height: 44px; }
.sst-empty { margin: 0; }
@media (min-width: 960px) { .sst-pays { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* «Ссылки для рекламы»: a link's address in one line with its copy button, four figures in a row. */
.sst-link { display: grid; gap: 8px; min-width: 0; container-type: inline-size; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel-2); }
.sst-link.is-hidden { opacity: .72; }
.sst-link-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.sst-link-head strong { font-size: 16px; overflow-wrap: anywhere; }
.sst-link-site { margin: -4px 0 0; font-size: 13px; }
.sst-link-url { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.sst-link-url code { overflow: hidden; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-deep); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.sst-copy { min-height: 44px; padding: 0 16px; }
.sst-link-figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0; }
.sst-link-figs div { display: grid; gap: 1px; min-width: 0; }
.sst-link-figs dt { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.sst-link-figs dd { margin: 0; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sst-link-ever { margin: 0; font-size: 13px; }
.sst-link-actions { display: flex; justify-content: flex-end; }
.sst-link-actions button { min-height: 40px; }
.sst-link-new > summary { width: fit-content; min-height: 44px; list-style: none; cursor: pointer; }
.sst-link-new > summary::-webkit-details-marker { display: none; }
.sst-link-new[open] > summary { margin-bottom: 10px; }
.sst-link-new form { display: grid; gap: 6px; max-width: 520px; }
.sst-link-new .form-actions { margin-top: 6px; }
.sst-help summary { min-height: 44px; display: flex; align-items: center; color: var(--text-2); cursor: pointer; list-style: none; }
.sst-help summary::-webkit-details-marker { display: none; }
/* A round «+» says it opens, as the site card's sections do («−» once open). */
.sst-help summary::after { content: "+"; display: grid; place-items: center; flex: 0 0 auto; width: 24px; height: 24px; margin-left: 8px; border: 1px solid var(--line-2); border-radius: 50%; color: var(--muted); }
.sst-help[open] summary::after { content: "−"; }
.sst-help ol { display: grid; gap: 6px; margin: 4px 0 0; padding-left: 20px; color: var(--text-2); font-size: 14px; line-height: 1.45; }
/* A phone's card: two figures a row, so «Попробовали» and «Оплатили» never run into each other. */
@container (max-width: 420px) { .sst-link-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 10px; } }
@media (min-width: 960px) { .sst-link-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* «Ссылки для рекламы»: how their link looks in Telegram, small (web/site-share-image.js linkCard), with «Сменить картинку». */
.sst-share:empty { display: none; }
.share-link-card { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel-2); }
.share-link-thumb { flex: none; width: 112px; aspect-ratio: 1200 / 630; overflow: hidden; border-radius: 6px; background: var(--panel-3); }
.share-link-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.share-link-text { display: grid; flex: 1 1 180px; gap: 2px; min-width: 0; }
.share-link-text .share-label { margin: 0; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.share-link-text b, .share-link-text small { overflow-wrap: anywhere; }
.share-link-text small { color: var(--muted); }
