/*
 * Public threat trends page (/growing-threats-trends). Colors come only from the Website theme tokens that
 * layouts.marketing defines, so the page follows every light and dark theme preset. Layout primitives such as
 * .wrap, .page-head, .kicker, .card, .trust, .table-scroll, .compare and .cta come from that layout.
 */
.tt { font-variant-numeric: tabular-nums; }
.tt-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.tt h3 { margin: 0; font-size: 18px; font-family: Georgia, serif; font-weight: 500; line-height: 1.3; }
.tt-note { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.tt-empty-row { list-style: none; color: var(--muted); font-size: 14px; }

.tt-live {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 8%, transparent);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}
.tt-pulse { position: relative; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.tt-pulse::after {
    content: "";
    position: absolute;
    inset: -4px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    opacity: .6;
    animation: tt-ping 1.8s ease-out infinite;
}
@keyframes tt-ping { from { transform: scale(.6); opacity: .7; } to { transform: scale(1.8); opacity: 0; } }

.tt-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 12px; margin: 8px 0 0; }
.tt-stat { margin: 0; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.tt-stat dt { color: var(--muted); font-size: 13px; font-weight: 600; }
.tt-stat dd { margin: 0; }
.tt-stat-value { padding-top: 6px; color: var(--text); font-family: Georgia, serif; font-size: clamp(26px, 3vw, 34px); line-height: 1.1; }
.tt-stat.is-hot .tt-stat-value { color: var(--accent); }
.tt-stat-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.tt-empty { max-width: 40em; margin-top: 12px; }
.tt-empty h2 { margin: 0 0 8px; font-family: Georgia, serif; font-weight: 500; font-size: 24px; }

.tt-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--muted) 16%, transparent);
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.tt-pill[data-tone="up"] { background: color-mix(in srgb, var(--accent) 26%, transparent); }
.tt-pill[data-tone="down"] { background: color-mix(in srgb, var(--ok) 24%, transparent); }
.tt-pill[data-tone="new"] { background: color-mix(in srgb, var(--secondary) 34%, transparent); }

.tt-bar { display: block; height: 6px; overflow: hidden; border-radius: 999px; background: color-mix(in srgb, var(--text) 10%, transparent); }
.tt-bar i { display: block; width: var(--share, 0%); height: 100%; border-radius: inherit; background: var(--accent); }
.tt-bar.is-muted i { background: color-mix(in srgb, var(--muted) 60%, transparent); }

.tt-headlines { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.tt-headline { position: relative; overflow: hidden; padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.tt-headline::before { content: ""; position: absolute; top: 0; right: 0; left: 0; height: 3px; background: var(--secondary); }
.tt-headline[data-tone="up"]::before { background: var(--accent); }
.tt-headline[data-tone="down"]::before { background: var(--ok); }
.tt-headline h3 { margin-top: 14px; }
.tt-headline p { margin: 8px 0 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.tt-headline-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--secondary) 24%, transparent);
    color: var(--text);
}
.tt-headline[data-tone="up"] .tt-headline-icon { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.tt-headline[data-tone="down"] .tt-headline-icon { background: color-mix(in srgb, var(--ok) 22%, transparent); }
.tt-headline-icon svg { display: none; width: 18px; height: 18px; }
.tt-headline[data-tone="up"] .tt-icon-up,
.tt-headline[data-tone="down"] .tt-icon-down,
.tt-headline[data-tone="info"] .tt-icon-info { display: block; }

.tt-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; }
.tt-legend li { display: inline-flex; align-items: center; gap: 8px; }
.tt-swatch { display: inline-block; width: 18px; height: 3px; border-radius: 2px; background: var(--accent); }
.tt-swatch.is-stopped { background: var(--ok); }
.tt-chart { position: relative; margin-top: 24px; padding-left: 52px; }
.tt-chart svg { display: block; width: 100%; height: 240px; overflow: visible; }
.tt-chart-y {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 46px;
    height: 240px;
    color: var(--muted);
    font-size: 12px;
    text-align: right;
}
.tt-chart-y span { transform: translateY(-50%); }
.tt-chart-y span:last-child { transform: translateY(50%); }
.tt-chart-x { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: 12px; }
.tt-chart-grid { stroke: var(--line-soft); stroke-dasharray: 4 6; vector-effect: non-scaling-stroke; }
.tt-chart-area { fill: url(#tt-fill); }
.tt-chart-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.tt-chart-stopped { fill: none; stroke: var(--ok); stroke-width: 2; stroke-dasharray: 6 5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.tt-chart-hit { fill: transparent; }
.tt-chart-hit:hover { fill: color-mix(in srgb, var(--text) 8%, transparent); }
.tt-stop-top { stop-color: var(--accent); stop-opacity: .38; }
.tt-stop-bottom { stop-color: var(--accent); stop-opacity: 0; }
.tt-table { margin-top: 20px; }
.tt-table summary { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); cursor: pointer; font-weight: 600; }
.tt-table .compare { min-width: 320px; }

.tt-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 16px; }
.tt-type { display: flex; flex-direction: column; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.tt-type-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tt-type-count { margin: 12px 0 0; font-family: Georgia, serif; font-size: 28px; line-height: 1.1; }
.tt-type-count small { margin-left: 4px; color: var(--muted); font-family: "Segoe UI", system-ui, sans-serif; font-size: 13px; }
.tt-type-text { flex: 1; margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.tt-spark { display: block; width: 100%; height: 44px; margin-top: 14px; }
.tt-spark-area { fill: url(#tt-fill); }
.tt-spark-line { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.tt-type-share { display: flex; align-items: center; gap: 10px; margin-top: 10px; color: var(--muted); font-size: 12px; }
.tt-type-share .tt-bar { flex: 1; }

.tt-split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.tt-rank { display: grid; gap: 14px; margin: 18px 0 0; padding: 0; list-style: none; }
.tt-rank-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 7px 12px; }
.tt-rank-row .tt-bar { grid-column: 1 / -1; }
.tt-rank-name { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 600; }
.tt-rank-name > span:last-child, .tt-path strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-rank-count { font-weight: 700; }
.tt-flag { font-size: 18px; line-height: 1; }
.tt-path { display: grid; min-width: 0; }
.tt-path strong { font-weight: 600; }
.tt-path span, .tt-net-name span, .tt-net-share { color: var(--muted); font-size: 13px; }

.tt-risers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px; margin-top: 18px; }
.tt-riser { padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.tt-riser p { margin: 0; }
.tt-riser-top { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.tt-riser-top .tt-flag { font-size: 24px; }
.tt-riser-growth { padding-top: 12px; color: var(--accent); font-family: Georgia, serif; font-size: 36px; line-height: 1; }
.tt-riser-meta { padding-top: 8px; color: var(--muted); font-size: 13px; }
.tt-compare { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px 10px; margin-top: 14px; color: var(--muted); font-size: 12px; }

.tt-networks { display: grid; margin: 18px 0 0; padding: 0; list-style: none; counter-reset: tt-net; }
.tt-net {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line-soft);
    counter-increment: tt-net;
}
.tt-net:last-child { border-bottom: 0; }
.tt-net::before { content: counter(tt-net); color: var(--muted); font-weight: 700; }
.tt-net-name { display: grid; min-width: 0; }
.tt-net-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.tt-net-stats { display: grid; justify-items: end; gap: 4px; }
.tt-net .tt-bar, .tt-net .tt-net-share { grid-column: 2 / -1; }

.tt-cover { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.tt-cover-numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; margin: 0; }
.tt-rules { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.tt-rules li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); color: var(--muted); }
.tt-rules li:last-child { border-bottom: 0; }
.tt-rules b { color: var(--text); font-weight: 700; }

.tt-refreshed [data-tt-total], .tt-refreshed [data-tt-protection] { animation: tt-flash 1.2s ease-out; }
@keyframes tt-flash { from { color: var(--accent-2); } to { color: inherit; } }

@media (max-width: 900px) {
    .tt-split, .tt-cover { grid-template-columns: minmax(0, 1fr); }
    .tt-chart { padding-left: 44px; }
    .tt-chart svg, .tt-chart-y { height: 200px; }
    .tt-chart-y { width: 38px; }
}
@media (prefers-reduced-motion: reduce) {
    .tt-pulse::after, .tt-refreshed [data-tt-total], .tt-refreshed [data-tt-protection] { animation: none; }
}
