.lores-traffic { min-width:0; }
.lores-traffic-toolbar { display:flex; align-items:end; justify-content:space-between; gap:18px; margin:0 0 18px; }
.lores-traffic-toolbar h2 { margin:4px 0 5px; font-size:clamp(1.45rem,3vw,1.95rem); letter-spacing:-.04em; }
.lores-traffic-toolbar p,.lores-traffic-heading p { margin:0; color:var(--muted); font-size:.83rem; line-height:1.5; }
.lores-traffic-kicker { color:var(--accent); letter-spacing:.07em; font-weight:750; font-size:.72rem; text-transform:uppercase; }
.lores-traffic-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:end; gap:8px; }
.lores-traffic-period { display:flex; gap:3px; padding:4px; border-radius:12px; border:1px solid var(--line); background:var(--panel); }
.lores-traffic-actions button { cursor:pointer; font:inherit; font-size:.8rem; font-weight:740; }
.lores-traffic-period button { color:var(--text); background:transparent; border:0; border-radius:8px; padding:0 10px; min-height:36px; }
.lores-traffic-period button[aria-pressed="true"] { background:var(--panel2); box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 45%,var(--line)); }
.lores-traffic-refresh { min-height:46px; display:flex; align-items:center; justify-content:center; gap:7px; padding:0 12px; border:1px solid color-mix(in srgb,var(--accent) 58%,var(--line)); border-radius:12px; background:color-mix(in srgb,var(--accent) 18%,var(--panel)); color:var(--text); }
.lores-traffic-refresh > span { display:grid; place-items:center; width:23px; height:23px; border-radius:50%; background:color-mix(in srgb,var(--accent) 25%,var(--panel)); transition:transform .26s ease; font-size:1rem; }
.lores-traffic-refresh:not(:disabled):hover > span { transform:rotate(45deg); }
.lores-traffic-status { flex-basis:100%; min-height:1.05em; text-align:end; color:var(--muted); font-size:.72rem; }
.lores-traffic button:focus-visible,.lores-traffic summary:focus-visible,.lores-traffic a:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.lores-traffic[data-loading] button { opacity:.62; cursor:wait; }
.lores-traffic[data-loading] .lores-traffic-refresh > span { animation:lores-traffic-spin .85s linear infinite; }
@keyframes lores-traffic-spin { to { transform:rotate(1turn); } }

.lores-traffic-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.lores-traffic-metric { --stat-color:#f3a8b9; display:grid; gap:5px; min-width:0; padding:15px 16px; border-radius:16px; border:1px solid var(--line); background:linear-gradient(135deg,color-mix(in srgb,var(--stat-color) 11%,var(--panel)),var(--panel) 74%); }
.lores-traffic-metric[data-stat="unique"] { --stat-color:#94dacf; }
.lores-traffic-metric[data-stat="logins"] { --stat-color:#bbadf4; }
.lores-traffic-metric[data-stat="signups"] { --stat-color:#f5c68e; }
.lores-traffic-metric > span { display:grid; place-items:center; width:31px; height:31px; margin-bottom:3px; border:1px solid color-mix(in srgb,var(--stat-color) 34%,var(--line)); border-radius:10px; background:color-mix(in srgb,var(--stat-color) 18%,var(--panel2)); color:var(--text); }
.lores-traffic-metric strong { font-size:clamp(1.35rem,3vw,2.05rem); letter-spacing:-.05em; font-variant-numeric:tabular-nums; }
.lores-traffic-metric small { color:var(--muted); font-weight:650; font-size:.79rem; line-height:1.32; }

.lores-traffic-panel { min-width:0; }
.lores-traffic-heading { margin:0 0 13px; }
.lores-traffic-heading h2 { margin:0 0 4px; }
.lores-traffic-single { display:flex; align-items:baseline; flex-wrap:wrap; gap:5px 8px; padding:16px; margin-bottom:12px; border:1px solid var(--line); border-radius:12px; background:color-mix(in srgb,var(--accent) 8%,var(--panel)); color:var(--muted); font-size:.86rem; }
.lores-traffic-single b { color:var(--text); font-size:1.15rem; margin-inline-start:auto; }
.lores-traffic-empty { padding:12px 0; color:var(--muted); }
.lores-traffic-chart { min-height:150px; display:flex; gap:clamp(2px,1.5vw,14px); overflow-x:auto; padding:10px 0 6px; margin-bottom:13px; }
.lores-traffic-column { display:grid; grid-template-rows:1fr auto; min-width:28px; flex:1; text-align:center; gap:5px; color:var(--muted); font-size:.69rem; }
.lores-traffic-column-bar { display:flex; align-items:flex-end; justify-content:center; height:122px; border-bottom:1px solid var(--line); background:repeating-linear-gradient(to top,transparent 0 calc(25% - 1px),var(--line) calc(25% - 1px) 25%); }
.lores-traffic-column-bar i { display:block; width:min(62%,38px); border-radius:6px 6px 2px 2px; background:linear-gradient(to top,color-mix(in srgb,var(--accent) 44%,var(--panel2)),var(--accent)); }
.lores-traffic-panel .table tbody th { color:var(--text); }
.lores-traffic-panel .table tbody :is(td,th) { font-variant-numeric:tabular-nums; white-space:nowrap; }
.lores-traffic-breakdown { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.lores-traffic-ranked { --channel-color:var(--accent); position:relative; border-bottom:1px solid var(--line); padding:10px 0; min-width:0; }
.lores-traffic-ranked:last-child { border-bottom:0; padding-bottom:0; }
.lores-traffic-ranked[data-channel="search"] { --channel-color:#a3e3bd; }
.lores-traffic-ranked[data-channel="social"] { --channel-color:#bca5e8; }
.lores-traffic-ranked[data-channel="email"] { --channel-color:#edc78d; }
.lores-traffic-ranked[data-channel="referral"] { --channel-color:#91d6e5; }
.lores-traffic-ranked[data-channel="direct"],.lores-traffic-ranked[data-channel="additional"] { --channel-color:#bdaabd; }
.lores-traffic-ranked-head { display:grid; grid-template-columns:28px minmax(0,1fr) auto; align-items:center; gap:8px; }
.lores-traffic-place { display:grid; place-items:center; width:27px; height:27px; border-radius:8px; color:var(--text); background:color-mix(in srgb,var(--channel-color) 16%,var(--panel2)); font-size:.76rem; font-weight:780; }
.lores-traffic-label,.lores-traffic-score { display:grid; gap:3px; font-size:.84rem; overflow-wrap:anywhere; }
.lores-traffic-score { justify-items:end; font-variant-numeric:tabular-nums; }
.lores-traffic-label a { color:var(--text); font-weight:750; text-decoration:none; }
.lores-traffic-label a:hover { text-decoration:underline; }
.lores-traffic-label a span { color:var(--accent); }
.lores-traffic-label small,.lores-traffic-score small { color:var(--muted); font-size:.73rem; }
.lores-traffic-meter { height:3px; border-radius:8px; margin:8px 0 0 36px; background:var(--line); overflow:hidden; }
.lores-traffic-meter > span { display:block; height:100%; border-radius:inherit; background:var(--channel-color); }
details.lores-traffic-ranked summary { display:block; cursor:pointer; overflow-wrap:anywhere; list-style:none; }
details.lores-traffic-ranked summary::-webkit-details-marker { display:none; }
details.lores-traffic-ranked summary .lores-traffic-ranked-head { padding-right:16px; }
.lores-traffic-chevron { position:absolute; inset-inline-end:0; top:11px; color:var(--muted); }
details[open] .lores-traffic-chevron { transform:rotate(180deg); }
details.lores-traffic-ranked ul { list-style:none; padding:0 0 0 36px; margin:8px 0 0; }
details.lores-traffic-ranked li { display:flex; gap:8px; justify-content:space-between; align-items:baseline; padding:5px 0; font-size:.78rem; overflow-wrap:anywhere; }
details.lores-traffic-ranked li > span { min-width:0; }
details.lores-traffic-ranked li small { display:block; color:var(--muted); font-size:.71rem; margin-top:2px; }
@media(max-width:920px) {
  .lores-traffic-breakdown { grid-template-columns:minmax(0,1fr); gap:0; }
}
@media(max-width:650px) {
  .lores-traffic-toolbar { flex-direction:column; align-items:stretch; gap:10px; }
  .lores-traffic-actions { justify-content:start; }
  .lores-traffic-status { text-align:start; }
  .lores-traffic-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .lores-traffic-metric { padding:12px 10px; }
}
@media(prefers-reduced-motion:reduce) {
  .lores-traffic-refresh > span { animation:none!important; transition:none; }
}
