:root {
    color-scheme: light;
    font-family: "Segoe UI", system-ui, sans-serif;
    color: #14263e;
    background: #edf2f8;
    --ink: #14263e;
    --muted: #53647a;
    --navy: #102745;
    --blue: #214c80;
    --gold: #f6c65b;
    --line: #e0e7f0;
    --positive: #086047;
    --surface: #fff;
}

* { box-sizing: border-box; }
body { margin: 0; }
main { width: min(100% - 48px, 1240px); margin-inline: auto; padding: 28px 0 72px; }

h1, h2, h3, p { margin: 0; }
h2 { font-size: 1.25rem; line-height: 1.2; letter-spacing: -.025em; }
h3 { font-size: 1rem; line-height: 1.35; }
p { line-height: 1.55; }

.masthead {
    color: #fff;
    background: linear-gradient(119deg, #10243e, #18395e);
    border-radius: 22px;
    padding: clamp(22px, 4vw, 44px);
    margin-bottom: 22px;
    box-shadow: 0 12px 30px #14263e12;
}
.masthead-top, .feed-heading, .trend-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.masthead-top { align-items: center; gap: 10px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 750; font-size: 1rem; }
.brand-mark {
    display: inline-block;
    flex: 0 0 19px;
    width: 19px;
    height: 19px;
    border: 2px solid var(--gold);
    border-radius: 50%;
    background: conic-gradient(from 24deg, var(--gold) 55deg, transparent 55deg);
}
.masthead-copy { margin-top: clamp(22px, 4vw, 38px); }
.masthead h1 {
    max-width: 900px;
    font-size: clamp(2.1rem, 5vw, 3.7rem);
    line-height: 1.04;
    letter-spacing: -.055em;
    font-weight: 760;
    text-wrap: balance;
}
.masthead-copy p { color: #d6e3f2; margin-top: 12px; font-size: clamp(.92rem, 2vw, 1.05rem); }
button {
    color: var(--navy);
    background: var(--gold);
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 9px 13px;
    font: inherit;
    font-size: .83rem;
    font-weight: 700;
    cursor: pointer;
}
button:hover { background: #ffe09c; }

section, .stat, .empty, .error {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
}
section { margin-bottom: 18px; }
.hotspots { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: 18px; margin-bottom: 30px; }
.hotspots section { margin: 0; min-width: 0; }
.hotspot-column { display: grid; gap: 18px; align-content: start; min-width: 0; }
.movers { box-shadow: 0 8px 26px #14263e0c; scroll-margin-top: 14px; }
.feed-heading { padding: 21px 22px 16px; }
.feed-heading p.muted { margin-top: 5px; }
.movers-heading { flex-wrap: wrap; align-items: end; }
.movers-heading h2 { font-size: clamp(1.7rem, 4vw, 2.35rem); }
.source-label { color: var(--blue); font-size: .75rem; font-weight: 700; margin-bottom: 5px; }
.hotspot-content { padding: 0 22px 22px; overflow-wrap: anywhere; }
.window-picker {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f1f5fa;
}
.window-picker a { padding: 6px 10px; border-radius: 7px; font-size: .8rem; white-space: nowrap; }
.window-picker a[aria-current] { color: white; background: var(--navy); }
.comparison-note { color: var(--muted); font-size: .8rem; padding: 0 0 13px; }
.comparison-note strong { display: block; color: var(--ink); font-variant-numeric: tabular-nums; }
.comparison-note span { display: block; margin-top: 2px; }
.muted { color: var(--muted); font-size: .82rem; }
.empty-inline { padding: 12px; margin-bottom: 10px; background: #f0f4f9; border-radius: 9px; font-size: .86rem; color: var(--muted); }

.hotspot-content ul, .hotspot-content ol { list-style: none; margin: 0; padding: 0; }
.hotspot-content li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.hotspot-content li + li { border-top: 1px solid var(--line); }
.hotspot-column li { padding: 10px 0; }
.hotspot-column .hotspot-content > p:last-child { margin-top: 10px; }
.hotspot-content .mover-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) minmax(86px, 108px);
    gap: 12px;
    align-items: start;
    padding: 13px 10px;
}
.gain-list .mover-row:first-child {
    border: 1px solid #d4e8de;
    border-radius: 12px;
    background: #eef8f2;
}
.gain-list .mover-row:first-child + li { border-top-color: transparent; }
.app-icon {
    width: 44px;
    height: 44px;
    position: relative;
    display: grid;
    place-items: center;
    border-radius: 11px;
    overflow: hidden;
    background: #e4edf8;
    color: var(--blue);
    font-size: 1rem;
    font-weight: 750;
}
.app-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mover-name { min-width: 0; }
.mover-name > a { display: inline-block; color: var(--ink); line-height: 1.3; font-size: .94rem; }
.mover-name .muted { margin-top: 3px; }
.rank-result { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rank-gain { display: flex; justify-content: flex-end; align-items: baseline; gap: 4px; color: var(--positive); font-size: .76rem; line-height: 1; font-weight: 650; }
.rank-gain strong { font-size: 1.55rem; letter-spacing: -.045em; }
.rank-change { color: var(--muted); font-size: .82rem; margin-top: 4px; }
.rank-change strong { color: var(--ink); }
.gain-track { height: 4px; margin: 7px 0 0 auto; width: 100%; border-radius: 20px; background: #dbe8e2; }
.gain-track span { display: block; height: 100%; min-width: 3px; background: #219675; border-radius: inherit; }
.rank-history summary { cursor: pointer; color: var(--blue); width: fit-content; }
.rank-history dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 6px 0 0; font-variant-numeric: tabular-nums; }
.rank-history dd { margin: 0; }
.list-heading { margin: 18px 0 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.support-list .rank-result { align-self: center; }

.badge {
    display: inline-block;
    white-space: nowrap;
    padding: 4px 9px;
    border-radius: 7px;
    background: #eaf0f8;
    color: var(--blue);
    font-size: .8rem;
    font-weight: 700;
}
.rank-now { font-variant-numeric: tabular-nums; }
.feeds-title { margin: 0 0 12px; }
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; }
.stat { padding: 14px; min-width: 0; }
.stat strong { display: block; font-size: 1.5rem; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.overview-note { margin: 10px 0 16px; }
.scroll { overflow: auto; max-height: 520px; border-top: 1px solid var(--line); }
table { border-collapse: separate; border-spacing: 0; width: 100%; text-align: left; font-size: .875rem; }
th, td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { position: sticky; top: 0; background: #f2f6fa; color: var(--muted); font-size: .82rem; }
tbody tr:hover { background: #f5f8fc; }
tbody tr:last-child td { border-bottom: 0; }
a { color: var(--blue); text-decoration: none; font-weight: 650; }
a:hover { text-decoration: underline; }
:is(a, button, summary, [tabindex]):focus-visible { outline: 2px solid #426dba; outline-offset: 3px; }
.masthead button:focus-visible { outline-color: #fff; }
.trends { border-top: 1px solid var(--line); }
.trends article { padding: 18px 22px; }
.trends article + article { border-top: 1px solid var(--line); }
.trends ul { margin: 8px 0 0; padding-left: 20px; }
.trends li { padding: 4px 0; font-size: .86rem; }
.empty, .error { padding: 18px 22px; }
section .empty { border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.error { border-color: #ebbaae; background: #fff5f2; }
.nowrap { white-space: nowrap; }

@media (max-width: 820px) {
    .hotspots { grid-template-columns: minmax(0, 1fr); }
    .hotspot-column { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
    .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 550px) {
    main { width: calc(100% - 24px); padding-top: 12px; }
    .masthead { border-radius: 16px; }
    .hotspot-column { grid-template-columns: minmax(0, 1fr); }
    .feed-heading { padding: 17px 15px 13px; }
    .hotspot-content { padding: 0 15px 16px; }
    .hotspot-content .mover-row { grid-template-columns: 36px minmax(0, 1fr) 76px; gap: 8px; padding: 11px 7px; }
    .app-icon { width: 36px; height: 36px; border-radius: 8px; }
    .rank-history dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .rank-history dd { margin-bottom: 4px; }
    .rank-gain strong { font-size: 1.3rem; }
    .rank-gain, .rank-change { font-size: .71rem; }
    .stat, th, td { padding: 10px; }
}
