#trafego .traffic-header { display:flex; justify-content:space-between; align-items:end; flex-wrap:wrap; gap:14px 24px; margin-bottom:8px; }
#trafego.content { padding-inline:clamp(10px,2vw,30px); }
#trafego .traffic-header h1 { margin:.15em 0; font-size:clamp(24px,3vw,36px); }
#trafego .traffic-header p { margin:0; color:var(--muted); }
#trafego .traffic-tabs { display:flex; flex-wrap:wrap; gap:6px; padding:5px; border:1px solid var(--line); border-radius:12px; background:var(--white); margin:0; }
#trafego .traffic-tabs button { color:inherit; background:transparent; border:0; box-shadow:none; }
#trafego .traffic-tabs button[aria-pressed="true"] { color:#e8fbef; background:#194837; }
#trafego .traffic-frames { min-width:0; }
#trafego iframe { display:block; width:100%; height:180px; border:0; background:transparent; }
#trafego iframe[hidden] { display:none; }
@media (max-width:640px) {
  #trafego .traffic-tabs { width:100%; }
  #trafego .traffic-tabs button { flex:1; }

}
#traffic-settings { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr)); align-items:start; gap:14px; margin-top:16px; }
#traffic-settings[hidden],#trafego .traffic-frames[hidden],#traffic-settings [hidden] { display:none!important; }
#traffic-settings .traffic-settings-card { min-width:0; margin:0; padding:clamp(14px,2vw,24px); }
.traffic-settings-grid,.traffic-settings-actions,#traffic-assignees { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.traffic-settings-grid > label { flex:1 1 180px; }
#traffic-assignees label { display:flex; align-items:center; gap:7px; padding:6px 10px; }
#traffic-assignees input { width:auto; margin:0; accent-color:#248362; }
#traffic-settings fieldset { margin:12px 0; padding:10px; border:1px solid var(--line); border-radius:8px; min-width:0; }
#traffic-meta-key { margin-top:18px; }
#traffic-settings .traffic-setup-guide { grid-column:1/-1; }
.traffic-setup-guide summary { cursor:pointer; font-weight:700; }
.traffic-setup-guide ol { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr)); gap:8px 22px; margin:14px 0 0; padding-left:22px; }
.traffic-setup-guide li { padding:4px 0; }
.traffic-settings-hint { color:var(--muted); font-size:13px; }
#traffic-account-ids { margin:12px 0; }
#traffic-assignment input:not([type=checkbox]),#traffic-meta-key input { display:block; width:100%; margin-top:5px; border:1px solid var(--line); border-radius:8px; padding:10px; background:var(--paper); color:var(--text); }
#traffic-assignees { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr)); }
#traffic-assignees label { cursor:pointer; border:1px solid var(--line); border-radius:8px; padding:9px; align-items:start; }
#traffic-assignees label:has(input:checked) { border-color:#3b9e78; }
#traffic-assignees label input[type=checkbox] { appearance:none; display:inline-grid; place-content:center; flex:0 0 17px; width:17px; height:17px; min-height:0; margin:2px 2px 0 0; padding:0; }
#traffic-assignees small { display:block; color:var(--muted); }
#traffic-assignees span { min-width:0; overflow-wrap:anywhere; }
#trafego .traffic-meta-help { display:flex; justify-content:flex-end; margin:4px 0 10px; }
#trafego .traffic-meta-help[hidden] { display:none; }
.traffic-token-guide { margin:12px 0; padding:10px 12px; border:1px solid var(--line); border-radius:8px; }
.traffic-token-guide summary { cursor:pointer; font-weight:700; }
.traffic-token-guide li { margin:8px 0; }
.traffic-token-guide a { display:inline-block; margin:4px 12px 4px 0; }
#traffic-settings .traffic-config-intro,#traffic-settings #traffic-assignment { grid-column:1/-1; }
.traffic-config-intro h2,.traffic-source-heading h3 { margin:0; }
.traffic-config-intro p { margin:7px 0 0; color:var(--muted); }
.traffic-source-heading { display:flex; justify-content:space-between; align-items:center; gap:8px; flex-wrap:wrap; }
.traffic-source-heading span { color:var(--muted); font-size:12px; }
.traffic-guide-actions { display:flex; flex-wrap:wrap; gap:6px; margin:10px 0; }
.traffic-guide-actions a { border:1px solid var(--line); border-radius:7px; padding:6px 9px; margin:0; }
#traffic-meta-guide code { overflow-wrap:anywhere; }
