.traffic-view { min-width: 0; }
.traffic-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:24px; }
.traffic-heading h1 { margin:4px 0 8px; }
.traffic-heading p, .traffic-help { color:var(--grey-300, #bcc2cb); font-size:14px; line-height:1.6; margin:0; }
.traffic-filter { display:flex; align-items:flex-end; flex-wrap:wrap; gap:12px; padding:20px; border:1px solid var(--border, #dedede); background:var(--surface, #fff); border-radius:14px; }
.traffic-filter label { display:grid; gap:7px; font-size:13px; font-weight:600; }
.traffic-filter input, .traffic-filter select { min-height:44px; min-width:145px; max-width:100%; padding:10px 12px; border:1px solid var(--border, #dedede); background:var(--surface, #fff); color:inherit; border-radius:8px; font:inherit; }
.traffic-filter .traffic-robots { display:flex; align-items:center; gap:8px; min-height:44px; }
.traffic-robots input { min-width:18px; min-height:18px; width:18px; height:18px; accent-color:#ee8d00; }
.traffic-presets { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0 20px; }
.traffic-presets button { min-height:40px; padding:8px 14px; }
.traffic-status { padding:16px 18px; border:1px solid var(--border, #dedede); border-radius:12px; font-size:14px; line-height:1.6; background:var(--surface, #fff); }
.traffic-status[data-state="stale"], .traffic-status[data-state="unavailable"], .traffic-status[data-state="partial"] { background:#fff6e5; border-color:#e7be72; color:#684612; }
.traffic-updated { display:block; min-height:20px; margin:8px 0 20px; color:var(--grey-300, #bcc2cb); font-size:12px; }
.traffic-metrics { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; margin-bottom:20px; }
.traffic-metric { display:grid; gap:12px; padding:20px; background:var(--surface, #fff); border:1px solid var(--border, #dedede); border-radius:12px; }
.traffic-metric span { font-size:13px; color:var(--grey-300, #bcc2cb); }
.traffic-metric strong { font-size:clamp(20px,2.4vw,30px); line-height:1.2; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.traffic-panel { min-width:0; padding:22px; border:1px solid var(--border, #dedede); border-radius:14px; background:var(--surface, #fff); margin:0 0 20px; }
.traffic-panel h2 { margin:0 0 20px; font-size:18px; }
.traffic-grid { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(0,1fr); gap:20px; }
.traffic-table-scroll { max-width:100%; overflow-x:auto; }
.traffic-panel table { width:100%; border-collapse:collapse; font-size:13px; }
.traffic-panel th, .traffic-panel td { padding:12px 10px; text-align:right; border-bottom:1px solid var(--border, #e7e7e7); white-space:nowrap; font-variant-numeric:tabular-nums; }
.traffic-panel th:first-child { text-align:left; white-space:normal; overflow-wrap:anywhere; min-width:120px; max-width:400px; }
.traffic-panel thead th { color:var(--grey-300, #bcc2cb); font-size:12px; font-weight:500; }
.traffic-panel tbody th { font-weight:500; }
.traffic-panel tr:last-child td, .traffic-panel tr:last-child th { border-bottom:0; }
.traffic-empty { color:var(--grey-300, #bcc2cb); padding:12px 0; font-size:14px; }
.traffic-chart { margin:0; }
.traffic-chart figcaption { display:flex; justify-content:space-between; gap:12px; color:var(--grey-300, #bcc2cb); font-size:12px; margin:0 0 18px; }
.traffic-chart-scroll { max-width:100%; overflow-x:auto; overscroll-behavior-x:contain; scrollbar-color:var(--grey-500, #818997) transparent; }
.traffic-chart-days { display:flex; width:max-content; min-width:100%; padding:50px 0 4px; }
.traffic-chart-day { position:relative; display:grid; grid-template-rows:180px 32px; flex:1 0 44px; width:44px; min-width:44px; padding:0 2px; border:0; border-radius:0; background:transparent; color:inherit; font:inherit; }
.traffic-chart-slot { display:block; height:180px; border-bottom:1px solid var(--grey-500, #818997); }
.traffic-chart-slot svg { display:block; width:100%; height:180px; }
.traffic-chart-day-label { align-self:center; font-size:12px; color:var(--grey-300, #bcc2cb); font-variant-numeric:tabular-nums; white-space:nowrap; }
.traffic-chart-tooltip { position:absolute; z-index:2; left:50%; top:-46px; transform:translateX(-50%); display:grid; gap:4px; width:max-content; padding:8px 12px; border:1px solid var(--grey-500, #818997); border-radius:8px; background:var(--graphite-800, #1a1f28); color:var(--white, #fff); box-shadow:0 4px 14px #0004; font-size:12px; line-height:1.4; text-align:left; white-space:nowrap; pointer-events:none; visibility:hidden; }
.traffic-chart-day:first-child .traffic-chart-tooltip { left:0; transform:none; }
.traffic-chart-day:last-child .traffic-chart-tooltip { left:auto; right:0; transform:none; }
.traffic-chart-day:only-child .traffic-chart-tooltip { left:50%; right:auto; transform:translateX(-50%); }
.traffic-chart-day:hover .traffic-chart-tooltip, .traffic-chart-day:focus .traffic-chart-tooltip { visibility:visible; }
.traffic-chart-days:has(.traffic-chart-day:focus-visible) .traffic-chart-day:not(:focus-visible) .traffic-chart-tooltip,
.traffic-chart-days:has(.traffic-chart-day:hover):not(:has(.traffic-chart-day:focus-visible)) .traffic-chart-day:not(:hover) .traffic-chart-tooltip { visibility:hidden; }
.traffic-chart-day:focus-visible { outline:2px solid var(--focus, #ffd08a); outline-offset:-2px; border-radius:4px; }
.traffic-chart-day:hover .traffic-bar, .traffic-chart-day:focus .traffic-bar { fill:#ffb23e; }
.traffic-chart-hint { margin:10px 0 0; color:var(--grey-300, #bcc2cb); font-size:12px; line-height:1.5; }
.traffic-bar { fill:#ee9208; }
.traffic-metrics.traffic-comparison-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
.traffic-comparison-legend { display:flex; flex-wrap:wrap; gap:20px; list-style:none; padding:0; margin:0; font-size:13px; }
.traffic-comparison-legend li, .traffic-comparison-value { display:flex; align-items:center; gap:8px; }
.traffic-series-dot { display:inline-block; width:10px; height:10px; border-radius:3px; flex-shrink:0; }
.traffic-series-yandex { background:#ff6863; }
.traffic-series-google { background:#62b3ff; }
.traffic-bar-yandex { fill:#ff6863; }
.traffic-bar-google { fill:#62b3ff; }
.traffic-chart-day:hover .traffic-bar-yandex, .traffic-chart-day:focus .traffic-bar-yandex { fill:#ff9894; }
.traffic-chart-day:hover .traffic-bar-google, .traffic-chart-day:focus .traffic-bar-google { fill:#94ceff; }
.traffic-comparison-chart .traffic-chart-days { padding-top:78px; }
.traffic-comparison-chart .traffic-chart-tooltip { top:-74px; }
.traffic-daily-details { margin-top:18px; font-size:13px; }
.traffic-daily-details summary { cursor:pointer; min-height:32px; }
.traffic-sampling { color:#684612; font-size:13px; }
.traffic-settings { margin-top:26px; border:1px solid var(--border, #dedede); background:var(--surface, #fff); border-radius:14px; padding:20px; }
.traffic-settings summary { font-weight:600; cursor:pointer; min-height:28px; }
.traffic-settings form { display:grid; gap:16px; margin-top:18px; max-width:660px; }
.traffic-settings label { display:grid; gap:8px; font-size:14px; }
.traffic-settings input { background:var(--graphite-900, #0f1217); color:inherit; min-height:44px; width:100%; box-sizing:border-box; border:1px solid var(--border, #dedede); border-radius:8px; padding:12px; font:inherit; }
.traffic-settings button { justify-self:start; }
.traffic-demo-bar { position:relative; z-index:50; display:flex; flex-wrap:wrap; gap:10px; align-items:center; padding:12px 20px; background:#324b3b; color:#fff; font-size:13px; }
.traffic-demo-bar button { padding:6px 10px; min-height:32px; border:1px solid #70957c; border-radius:6px; background:#253a2d; color:#fff; cursor:pointer; }
.traffic-server-metrics { grid-template-columns:repeat(4,minmax(0,1fr)); }
.traffic-source-badge { display:inline-block; padding:8px 12px; border-radius:8px; background:#263c31; color:#c1e8ce; font-size:13px; margin:0 0 16px; }
.traffic-reserve-help { margin-bottom:18px; }
.traffic-bar-missing { fill:#858b94; }
.traffic-query-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; }
.traffic-query-heading h2 { margin-bottom:10px; }
.traffic-query-heading button { flex-shrink:0; }
.traffic-query-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; margin-top:24px; }
.traffic-query-grid section { min-width:0; }
.traffic-query-grid h3 { font-size:17px; margin:0 0 14px; }
.traffic-query-grid th[scope="row"] { min-width:170px; white-space:normal; overflow-wrap:anywhere; }
.traffic-query-grid .traffic-query-page { min-width:170px; max-width:260px; text-align:left; white-space:normal; overflow-wrap:anywhere; }
.traffic-query-page a { display:inline-block; padding:4px 0; color:#ffb343; text-decoration:underline; text-underline-offset:3px; }
.traffic-query-views { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 14px; }
.traffic-query-views button { min-height:44px; padding:8px 12px; }
.traffic-query-views button[aria-pressed="true"] { color:#17110a; background:#ff9800; border-color:#ff9800; }
.traffic-query-periods { display:flex; flex-wrap:wrap; gap:8px; margin:18px 0 12px; }
.traffic-query-periods button { min-height:44px; padding:8px 14px; }
.traffic-query-periods button[aria-pressed="true"] { color:#17110a; background:#ff9800; border-color:#ff9800; }
.traffic-query-custom { display:flex; flex-wrap:wrap; align-items:flex-end; gap:12px; margin:0 0 12px; }
.traffic-query-custom[hidden] { display:none; }
.traffic-query-custom label { display:grid; gap:7px; font-size:13px; }
.traffic-query-custom input { min-height:44px; max-width:100%; box-sizing:border-box; padding:10px 12px; border:1px solid var(--border,#303640); border-radius:8px; background:#0f1217; color:inherit; font:inherit; }
.traffic-query-custom button { min-height:44px; }
.traffic-query-period-error { color:#ffd08a; font-size:13px; line-height:1.5; margin:8px 0; }
.traffic-query-period-error:empty { display:none; }
.traffic-query-status { font-size:13px; line-height:1.6; }
.traffic-query-status[data-state="stale"], .traffic-query-status[data-state="unavailable"], .traffic-query-status[data-state="not_configured"] { color:#ffd08a; }
.traffic-query-settings { margin-top:24px; padding-top:20px; border-top:1px solid var(--border, #303640); overflow-wrap:anywhere; }
.traffic-query-settings summary { cursor:pointer; font-weight:600; min-height:32px; }
.traffic-query-settings form { display:grid; gap:16px; max-width:660px; margin-top:18px; }
.traffic-query-settings label { display:grid; gap:8px; font-size:14px; }
.traffic-query-settings select, .traffic-query-settings input { width:100%; min-width:0; min-height:44px; box-sizing:border-box; padding:10px; border:1px solid var(--border, #303640); border-radius:8px; background:var(--graphite-900, #0f1217); color:inherit; font:inherit; }
.traffic-query-settings button { justify-self:start; }
@media (max-width:1100px) { .traffic-query-grid { grid-template-columns:minmax(0,1fr); } }
@media (max-width:600px) { .traffic-query-heading { flex-direction:column; } .traffic-query-heading button { width:100%; } }
.traffic-chart-controls { display:flex; flex-wrap:wrap; justify-content:space-between; gap:12px 20px; }
.traffic-chart-modes { display:flex; flex-wrap:wrap; gap:8px; }
.traffic-chart-modes button { min-height:44px; padding:10px 14px; border:1px solid var(--grey-500, #818997); border-radius:8px; background:var(--graphite-800, #1a1f28); color:inherit; font:inherit; font-size:13px; font-weight:600; cursor:pointer; }
.traffic-chart-modes button:hover { border-color:#ff9800; }
.traffic-chart-modes button[aria-pressed="true"] { background:#ff9800; border-color:#ff9800; color:#080b0d; }
.traffic-chart-modes button:focus-visible { outline:2px solid var(--focus, #ffd08a); outline-offset:3px; }
.traffic-chart-loading { min-height:20px; margin:12px 0 8px; color:var(--grey-300, #bcc2cb); font-size:13px; }
.traffic-chart-panel[aria-busy="true"] [data-traffic-chart-content] { opacity:.45; }
.traffic-chart-secondary-controls { margin-top:12px; }
.traffic-series-switches { display:flex; flex-wrap:wrap; align-items:center; gap:8px; font-size:13px; }
.traffic-series-switches[hidden] { display:none; }
.traffic-series-switches button { display:flex; align-items:center; gap:8px; min-height:44px; padding:10px 14px; border:1px solid var(--grey-500, #818997); border-radius:8px; background:var(--graphite-800, #1a1f28); color:inherit; font:inherit; font-weight:600; cursor:pointer; }
.traffic-series-switches button[aria-pressed="true"] { border-color:var(--grey-300, #bcc2cb); box-shadow:inset 0 0 0 1px var(--grey-300, #bcc2cb); }
.traffic-series-switches button[aria-pressed="false"] { opacity:.55; text-decoration:line-through; }
.traffic-series-switches button:focus-visible { outline:2px solid var(--focus, #ffd08a); outline-offset:3px; }
.traffic-point-note { font-size:11px; color:var(--grey-300, #bcc2cb); }
.traffic-group-help { margin-top:12px; }
.traffic-bar-partial { fill-opacity:.65; }
.traffic-chart-grouped .traffic-chart-day { flex-basis:96px; min-width:96px; width:96px; }
.traffic-chart-grouped .traffic-chart-days, .traffic-chart-grouped .traffic-line-plot .traffic-chart-days { padding-top:112px; }
.traffic-chart-grouped .traffic-chart-day .traffic-chart-tooltip { top:-108px; }
.traffic-chart-grouped .traffic-line-svg { top:112px; }
.traffic-chart-grouped .traffic-line-axis { padding-top:132px; }
.traffic-line-layout { display:flex; min-width:0; }
.traffic-line-axis { box-sizing:content-box; display:flex; flex-direction:column; justify-content:space-between; height:160px; padding-top:98px; flex:0 0 36px; color:var(--grey-300, #bcc2cb); font-size:11px; font-variant-numeric:tabular-nums; }
.traffic-line-axis span { line-height:0; }
.traffic-line-layout .traffic-chart-scroll { flex:1; min-width:0; }
.traffic-line-plot { position:relative; width:max-content; min-width:100%; }
.traffic-line-plot .traffic-chart-days { padding-top:78px; }
.traffic-line-svg { position:absolute; left:0; top:78px; width:100%; height:200px; overflow:visible; pointer-events:none; }
.traffic-line-grid { fill:none; stroke:var(--grey-500, #818997); stroke-opacity:.25; vector-effect:non-scaling-stroke; }
.traffic-line, .traffic-line-points { fill:none; stroke-width:2.5; stroke-linejoin:round; stroke-linecap:round; vector-effect:non-scaling-stroke; }
.traffic-line-points { stroke-width:6; }
.traffic-line-yandex { stroke:#ff6863; }
.traffic-line-google { stroke:#62b3ff; }
.traffic-line-visits, .traffic-line-requests { stroke:#ee9208; }
.traffic-series-visits, .traffic-series-requests { background:#ee9208; }
.traffic-line-day { z-index:1; }
.traffic-line-day .traffic-chart-slot { position:relative; border-bottom:0; }
.traffic-line-day:hover .traffic-chart-slot::after, .traffic-line-day:focus .traffic-chart-slot::after { content:""; position:absolute; left:50%; top:0; bottom:0; border-left:1px dashed var(--grey-300, #bcc2cb); }
.traffic-line-plot .traffic-chart-tooltip { top:-74px; }
.traffic-chart-tooltip { display:none; }
.traffic-chart-day:nth-child(2):nth-last-child(n+3) .traffic-chart-tooltip { left:0; right:auto; transform:none; }
.traffic-chart-day:nth-last-child(2):nth-child(n+3) .traffic-chart-tooltip { left:auto; right:0; transform:none; }
.traffic-chart-day:hover .traffic-chart-tooltip, .traffic-chart-day:focus .traffic-chart-tooltip { display:grid; }
.traffic-chart-days:has(.traffic-chart-day:focus-visible) .traffic-chart-day:not(:focus-visible) .traffic-chart-tooltip,
.traffic-chart-days:has(.traffic-chart-day:hover):not(:has(.traffic-chart-day:focus-visible)) .traffic-chart-day:not(:hover) .traffic-chart-tooltip { display:none; }
@media (max-width:600px) { .traffic-line-axis { flex-basis:28px; } .traffic-line-day { flex-basis:40px; width:40px; min-width:40px; } }
@media (max-width:1100px) { .traffic-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); } .traffic-grid { grid-template-columns:minmax(0,1fr); gap:0; } }
@media (max-width:600px) { .traffic-heading { display:block; } .traffic-heading a { display:inline-flex; margin-top:14px; } .traffic-filter { padding:14px; } .traffic-filter label { flex:1 1 130px; } .traffic-filter .traffic-robots { flex-basis:100%; } .traffic-filter button { width:100%; } .traffic-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; } .traffic-metric { padding:16px; } .traffic-panel { padding:16px 12px; } .traffic-chart figcaption { flex-direction:column; gap:6px; } }
