.traffic-extract {
  --extract-accent: var(--product-accent, #83edd0);
  --extract-control-edge: #49637a;
  --extract-control-face: linear-gradient(165deg, #263c50 0%, #1b2e41 44%, #17283a 100%);
  --extract-control-depth: inset 0 1px 0 #d3f1ff1e, inset 0 -1px 0 #05111f80, 0 2px 4px #030a143b;
  --extract-selected-face: linear-gradient(160deg, color-mix(in srgb, var(--extract-accent) 28%, #193043), color-mix(in srgb, var(--extract-accent) 13%, #112638));
  --extract-ink: #eef5fa;
  --extract-muted: #a1b3c6;
  --extract-border: #2c3c50;
  --extract-padding: clamp(17px, 1.65vw, 27px);
  --extract-section-gap: clamp(10px, .84vw, 14px);
  --extract-flow-head: color-mix(in srgb, var(--extract-accent) 64%, white);
  --extract-flow-track: color-mix(in srgb, var(--extract-accent) 26%, #2e4158);
  min-width: 0;
  container: extract / inline-size;
}
.traffic-extract__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 2px 0 16px;
}
.traffic-extract__heading h2 {
  color: var(--extract-ink);
  font-size: clamp(1.35rem, 2.3vw, 2rem);
  font-weight: 680;
  line-height: 1.16;
  letter-spacing: -.025em;
}
.traffic-extract__allowance {
  display: flex;
  align-items: baseline;
  justify-content: end;
  flex-wrap: wrap;
  gap: 2px 9px;
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--extract-accent) 22%, #293a4c);
  border-radius: 8px;
  background: linear-gradient(150deg, #1d3142, #101e2e);
  box-shadow: inset 0 1px #ecffff0c;
  color: var(--extract-muted);
  font-size: .79rem;
}
.traffic-extract__allowance strong {
  color: var(--extract-accent);
  font-size: 1rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.traffic-extract .traffic-extract__jump { display: none; }
.traffic-extract__rail { scroll-margin-top: 78px; }
@container extract (max-width: 874px) {
  .traffic-extract__heading { flex-wrap: wrap; }
  .traffic-extract__allowance { margin-inline-start: auto; }
  .traffic-extract .traffic-extract__jump { display: inline-flex; align-items: center; gap: 8px; color: var(--extract-accent); }
}
.traffic-extract__form {
  display: grid;
  align-items: start;
  gap: clamp(14px, 1.5vw, 24px);
}
.traffic-extract__config, .traffic-extract__rail {
  min-width: 0;
  border-color: #354b62;
  box-shadow: inset 0 1px #e0f5ff16, 0 2px 4px #030a173d, 0 12px 32px -14px #020711c9;
}
.traffic-extract__config {
  display: grid;
  padding: var(--extract-padding);
  background: radial-gradient(ellipse at 0 0, #253d5470, transparent 63%), linear-gradient(130deg, #17273a, #111c2b 76%);
}
.traffic-extract__rail {
  border-color: color-mix(in srgb, var(--extract-accent) 30%, #27394a);
  background: radial-gradient(ellipse at top right, color-mix(in srgb, var(--extract-accent) 14%, transparent), transparent 63%), linear-gradient(125deg, #1e3345, #122434 70%);
}
.traffic-extract__group, .traffic-extract__target-method {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.traffic-extract__config > .traffic-extract__group:not(:last-child) {
  position: relative;
  margin-block-end: var(--extract-section-gap);
  padding-block-end: var(--extract-section-gap);
}
.traffic-extract__group > legend, .traffic-extract__results > h3 {
  margin: 0 0 12px;
  padding: 0;
  color: var(--extract-ink);
  font-size: clamp(1.04rem, 1.35vw, 1.26rem);
  line-height: 1.28;
  font-weight: 650;
  letter-spacing: -.015em;
}
.traffic-extract__setup { --heading-icon: url('./assets/feature-icons/dynamic/global-pool.svg'); }
.traffic-extract__filters { --heading-icon: url('./assets/feature-icons/dynamic/city-targeting.svg'); }
.traffic-extract__session { --heading-icon: url('./assets/feature-icons/dynamic/sticky-session.svg'); }
.traffic-extract__output-fields { --heading-icon: url('./assets/feature-icons/dynamic/api-integration.svg'); }
.traffic-extract__results { --heading-icon: url('./assets/feature-icons/dynamic/traffic-plans.svg'); }
.dash-product-mobile .traffic-extract__setup { --heading-icon: url('./assets/feature-icons/mobile/carrier-network.svg'); }
.dash-product-mobile .traffic-extract__filters { --heading-icon: url('./assets/feature-icons/mobile/regional-content.svg'); }
.dash-product-mobile .traffic-extract__session { --heading-icon: url('./assets/feature-icons/mobile/session-modes.svg'); }
.dash-product-mobile .traffic-extract__output-fields { --heading-icon: url('./assets/feature-icons/mobile/protocol-support.svg'); }
.dash-product-mobile .traffic-extract__results { --heading-icon: url('./assets/feature-icons/mobile/data-bundles.svg'); }
.traffic-extract__group > legend::before, .traffic-extract__results > h3::before {
  content: '';
  display: inline-block;
  width: 26px;
  height: 26px;
  margin-inline-end: 9px;
  vertical-align: -.36em;
  background: var(--heading-icon) center / contain no-repeat;
}
/* 光头和底线共享两像素画布，避免扫光溢出、遮住控件或裁掉焦点环。 */
.traffic-extract__config > .traffic-extract__group:not(:last-child)::after,
.traffic-extract__results::before, .traffic-extract__preview::before {
  content: '';
  position: absolute;
  inset-inline: 0;
  height: 2px;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, color-mix(in srgb, var(--extract-accent) 42%, transparent) 48%, var(--extract-accent) 79%, var(--extract-flow-head) 87%, transparent 100%) 45% center / 26% 2px no-repeat,
    linear-gradient(90deg, transparent, var(--extract-flow-track) 6%, var(--extract-flow-track) 92%, transparent) center / 100% 1px no-repeat;
}
.traffic-extract__config > .traffic-extract__group::after { bottom: 0; }
.traffic-extract__results, .traffic-extract__preview { position: relative; }
.traffic-extract__results::before, .traffic-extract__preview::before { top: 0; }
@keyframes extract-divider-flow {
  from { background-position: -36% center, center; }
  to { background-position: 136% center, center; }
}
@media (prefers-reduced-motion: no-preference) and (forced-colors: none) {
  .traffic-extract__config > .traffic-extract__group:not(:last-child)::after,
  .traffic-extract__results::before, .traffic-extract__preview::before {
    animation: extract-divider-flow 5.8s linear infinite;
    animation-delay: var(--flow-offset, -2.6s);
  }
  .traffic-extract__filters { --flow-offset: -4.4s; }
  .traffic-extract__results { --flow-offset: -1.8s; }
  .traffic-extract__preview { --flow-offset: -3.4s; }
}
@media (forced-colors: active) {
  .traffic-extract__config > .traffic-extract__group:not(:last-child)::after,
  .traffic-extract__results::before, .traffic-extract__preview::before { background: none; height: 0; border-top: 1px solid CanvasText; }
}
.traffic-extract__fields, .traffic-extract__refine-fields {
  display: grid;
  align-items: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}
.traffic-extract__auth, .traffic-extract__network { margin-top: 13px; }
.traffic-extract__session-options {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  padding: 4px;
  border: 1px solid #32475a;
  border-radius: 10px;
  background: #0c1928;
  box-shadow: inset 0 1px 3px #020a164f;
}
.traffic-extract__session-options label {
  position: relative;
  flex: 1 1 auto;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 7px;
  text-align: center;
  color: #bacada;
  font-size: .84rem;
  font-weight: 570;
  cursor: pointer;
}
.traffic-extract__session-options input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.traffic-extract__session-options label:hover { color: var(--extract-ink); background: #1d3144; }
.traffic-extract__session-options label:has(input:checked),
.traffic-extract__target-method label:has(input:checked),
.traffic-extract__mode .dash-button[aria-pressed='true'] {
  background: var(--extract-selected-face);
  border-color: color-mix(in srgb, var(--extract-accent) 52%, #3b586a);
  color: color-mix(in srgb, var(--extract-accent) 60%, white);
  box-shadow: var(--extract-control-depth);
}
.traffic-extract__timing:not(:has([data-traffic-lifetime][hidden])) { margin-top: 15px; }
.traffic-extract__timing { grid-template-columns: minmax(0,1fr) minmax(85px,.32fr); }
.traffic-extract__timing:has([data-traffic-time][hidden]) > [data-traffic-lifetime] { grid-column: 1 / -1; }
.traffic-extract__field[data-traffic-template] { grid-column: 1 / -1; }
.traffic-extract__field[data-traffic-template] input { font-family: Consolas, "Courier New", monospace; }
.traffic-extract__field { position: relative; display: grid; gap: 7px; align-content: start; min-width: 0; }
.traffic-extract__field > span {
  color: #c2d0dc;
  font-size: .84rem;
  font-weight: 540;
  line-height: 1.3;
}
.traffic-extract__field > span small { color: var(--extract-muted); font-weight: 400; }
.traffic-extract__field :is(input, select) {
  width: 100%;
  min-width: 0;
  min-height: 45px;
  padding: 8px 12px;
  border: 1px solid var(--extract-control-edge);
  border-radius: 8px;
  background: linear-gradient(#0c1b2a, #14273a);
  box-shadow: inset 0 2px 4px #020a174f, 0 1px 0 #cfedff11;
  color: var(--extract-ink);
  font: inherit;
  font-size: .9rem;
  text-overflow: ellipsis;
}
.traffic-extract__field select {
  appearance: none;
  background: var(--extract-control-face);
  box-shadow: var(--extract-control-depth);
  padding-inline-end: 34px;
  cursor: pointer;
}
.traffic-extract__field select option { color: var(--extract-ink); background: #142537; }
.traffic-extract__field:has(> select)::after {
  content: '';
  pointer-events: none;
  position: absolute;
  inset-inline-end: 16px;
  bottom: 20px;
  width: 7px;
  height: 7px;
  border: solid color-mix(in srgb, var(--extract-accent) 46%, #b1c5d7);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.traffic-extract__field:has(> select:disabled)::after { border-color: #8195a9; }
.traffic-extract__field :is(input:not([readonly]), select):hover:not(:disabled) { border-color: color-mix(in srgb, var(--extract-accent) 42%, #697e92); }
.traffic-extract__field :is(input, select):focus-visible,
.traffic-extract :is(.dash-button, summary, .traffic-extract__check input):focus-visible,
.traffic-extract :is(.traffic-extract__session-options, .traffic-extract__target-method) label:has(input:focus-visible) {
  outline: 2px solid var(--extract-accent);
  outline-offset: 2px;
}
.traffic-extract__field :is(:disabled, input[readonly]) {
  border-color: #33495f;
  background: #172534;
  color: #a0b3c5;
  box-shadow: inset 0 1px 2px #030c1826;
  opacity: 1;
  cursor: default;
}
.traffic-extract__field input::placeholder { color: #99aec2; font-size: .83rem; }
.traffic-extract__field input:invalid:not(:placeholder-shown) { border-color: #bc6f81; }
.traffic-extract__check {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 33px;
  margin-top: 2px;
  color: #bed0dd;
  font-size: .83rem;
  cursor: pointer;
}
.traffic-extract__check input {
  appearance: none;
  width: 18px;
  height: 18px;
  flex: none;
  display: grid;
  place-content: center;
  margin: 0;
  border: 1px solid #638098;
  border-radius: 5px;
  background: var(--extract-control-face);
  box-shadow: var(--extract-control-depth);
  cursor: pointer;
}
.traffic-extract__check:hover input, .traffic-extract__check input:checked { border-color: var(--extract-accent); }
.traffic-extract__check input:checked { background: var(--extract-accent); }
.traffic-extract__check input:checked::before {
  content: '';
  width: 9px;
  height: 5px;
  border: solid #102539;
  border-width: 0 0 2px 2px;
  transform: translateY(-1px) rotate(-45deg);
}
.traffic-extract__refinements {
  margin-top: 16px;
  border: 1px solid var(--extract-control-edge);
  border-radius: 8px;
  background: #101f2f;
}
.traffic-extract__refinements > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 13px;
  border-radius: inherit;
  color: #d5e4ef;
  background: var(--extract-control-face);
  box-shadow: var(--extract-control-depth);
  font-size: .84rem;
  font-weight: 560;
  list-style: none;
  cursor: pointer;
}
.traffic-extract__refinements > summary::-webkit-details-marker { display: none; }
.traffic-extract__refinements > summary::after {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-inline-end: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  margin: 0 2px 3px auto;
  transform: rotate(45deg);
}
.traffic-extract__refinements[open] > summary::after { transform: rotate(225deg); margin-bottom: -3px; }
.traffic-extract__refinements > summary:hover, .traffic-extract__refinements[open] > summary {
  color: color-mix(in srgb, var(--extract-accent) 60%, white);
  background: var(--extract-selected-face);
}
.traffic-extract__refine-fields { align-items: end; padding: 5px 14px 16px; }
.traffic-extract__target-method > div { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.traffic-extract__target-method label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 41px;
  padding: 5px 10px;
  border: 1px solid var(--extract-control-edge);
  border-radius: 8px;
  background: var(--extract-control-face);
  box-shadow: var(--extract-control-depth);
  color: #cedeeb;
  font-size: .84rem;
  cursor: pointer;
}
.traffic-extract__target-method input { margin: 0; accent-color: var(--extract-accent); }
.traffic-extract__hint, .traffic-extract__count { color: var(--extract-muted); font-size: .83rem; line-height: 1.52; }
.traffic-extract__hint { margin-top: 8px; }
.traffic-extract__hint:empty { display: none; }
.traffic-extract__access a, .traffic-extract__warning a { color: var(--extract-accent); text-decoration: underline; text-underline-offset: 3px; }
.traffic-extract__generation, .traffic-extract__results { padding: var(--extract-padding); }
.traffic-extract__generation { padding-bottom: 17px; }
.traffic-extract__output-fields .traffic-extract__fields { grid-template-columns: minmax(0, 1fr) minmax(98px, .51fr); align-items: end; }
.traffic-extract__output-fields [name='quantity'] { font-variant-numeric: tabular-nums; }
.traffic-extract__field[data-traffic-password] input { color: #b0c2d1; letter-spacing: .14em; }
.traffic-extract .dash-button {
  background: var(--extract-control-face);
  border-color: var(--extract-control-edge);
  color: #e0edf6;
  box-shadow: var(--extract-control-depth);
}
.traffic-extract .dash-button:hover:not(:disabled) {
  color: var(--extract-ink);
  border-color: color-mix(in srgb, var(--extract-accent) 52%, #566e85);
  background: linear-gradient(165deg, #2d485d, #1e3449);
}
.traffic-extract .dash-button:active:not(:disabled),
.traffic-extract__session-options label:active,
.traffic-extract__refinements summary:active {
  transform: none;
  box-shadow: inset 0 2px 4px #0410217a;
}
.traffic-extract__export { position: relative; }
.traffic-extract__export > summary { list-style: none; cursor: pointer; }
.traffic-extract__export > summary::-webkit-details-marker { display: none; }
.traffic-extract__export > summary::after { content: ''; width: 5px; height: 5px; border-bottom: 1.5px solid; border-inline-end: 1.5px solid; transform: rotate(45deg); margin: 0 1px 3px 2px; }
.traffic-extract__export[open] > summary::after { transform: rotate(225deg); margin-bottom: -3px; }
.traffic-extract__export > div { position: absolute; z-index: 2; inset: calc(100% + 4px) 0 auto auto; display: grid; gap: 3px; min-width: 104px; padding: 5px; border: 1px solid #405870; border-radius: 9px; background: #17283b; box-shadow: 0 6px 18px #03081155; }
.traffic-extract__export .dash-button { white-space: nowrap; }
.traffic-extract__export > div .dash-button { justify-content: start; }
.traffic-extract__warning {
  margin-top: 18px;
  padding-inline-start: 11px;
  border-inline-start: 2px solid #d7ac71;
  color: #d5c9b6;
  font-size: .84rem;
  line-height: 1.55;
}
.traffic-extract__warning a { display: inline-block; padding-block: 3px; }
.traffic-extract__actions, .traffic-extract__result-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.traffic-extract__submit { margin-top: 19px; }
.traffic-extract__submit .dash-button { min-height: 44px; }
.traffic-extract__submit .is-primary { flex: 1 1 auto; }
.traffic-extract__submit .dash-button.is-primary:not(:disabled) {
  color: #0b1b25;
  background: linear-gradient(165deg, color-mix(in srgb, var(--extract-accent) 72%, white), var(--extract-accent) 60%, color-mix(in srgb, var(--extract-accent) 84%, #21495b));
  border-color: color-mix(in srgb, var(--extract-accent) 73%, white);
  box-shadow: inset 0 1px 0 #ffffff70, inset 0 -1px 0 #24425633, 0 3px 7px #07132066;
}
.traffic-extract__submit .dash-button.is-primary:hover:not(:disabled) { filter: brightness(1.07); }
.traffic-extract__submit .dash-button.is-primary:active:not(:disabled) { box-shadow: inset 0 2px 4px #162c394d; }
.traffic-extract .dash-button:disabled {
  opacity: 1;
  color: #9bafc1;
  border-color: #3b4d60;
  background: #243443;
  box-shadow: none;
}
.traffic-extract__results { background: #0e1c2c; scroll-margin-top: 85px; }
.traffic-extract__results > h3 { margin-bottom: 7px; }
.traffic-extract__results:has([data-traffic-output]:empty) .traffic-extract__count {
  margin-top: 15px;
  padding: 19px 14px;
  border: 1px dashed #3d5266;
  border-radius: 8px;
  text-align: center;
}
.traffic-extract__result-tools { justify-content: space-between; gap: 10px; margin-top: 17px; }
.traffic-extract__result-tools .dash-button { min-height: 35px; padding: 5px 9px; font-size: .76rem; }
.traffic-extract__mode { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 2px; border: 1px solid var(--extract-border); border-radius: 8px; background: #0b1623; }
.traffic-extract__mode .dash-button:not([aria-pressed='true']):not(:hover) { background: transparent; border-color: transparent; box-shadow: none; }
.traffic-extract__preview {
  display: grid;
  gap: 3px;
  padding: 11px var(--extract-padding) 13px;
  color: var(--extract-muted);
  font-size: .76rem;
  line-height: 1.5;
}
.traffic-extract__preview strong { color: #c4d3dd; font-weight: 600; }
.traffic-extract__table-scroll, .traffic-extract__list {
  min-width: 0;
  max-height: clamp(170px, 34vh, 380px);
  margin: 12px 0 0;
  overflow: auto;
  scrollbar-color: #4c667d #111f30;
  scrollbar-width: thin;
}
.traffic-extract__table-scroll { border: 1px solid var(--extract-border); border-radius: 8px; }
.traffic-extract__table { width: 100%; min-width: 340px; }
.traffic-extract__table :is(th,td) { padding: 7px; text-align: start; font-size: .78rem; }
.traffic-extract__table th { position: sticky; z-index: 1; top: 0; background: #1b2b3c; }
.traffic-extract__table code, .traffic-extract__list code { color: #c9dfeb; font-family: Consolas, 'Courier New', monospace; font-size: .78rem; overflow-wrap: anywhere; }
.traffic-extract__table .dash-button, .traffic-extract__list .dash-button { min-height: 32px; padding: 4px 7px; font-size: .77rem; }
.traffic-extract__list { padding: 0; list-style: none; }
.traffic-extract__list li { display: grid; align-items: start; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; padding: 9px 4px; border-top: 1px solid var(--extract-border); }
.traffic-extract__list li > span { color: var(--extract-muted); font-size: .77rem; font-variant-numeric: tabular-nums; }

@container extract (min-width: 875px) {
  .traffic-extract__form { grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr); }
}
@container extract (min-width: 680px) {
  .traffic-extract__filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    column-gap: 16px;
  }
  .traffic-extract__filters .traffic-extract__optimization,
  .traffic-extract__filters .traffic-extract__refine-fields { grid-template-columns: minmax(0, 1fr); }
  /* 对齐筛选框和展开按钮；展开后按钮仍处于原位置。 */
  .traffic-extract__filters .traffic-extract__refinements { margin-top: calc(1.092rem + 7px); }
  .traffic-extract__filters .traffic-extract__refinements > summary { min-height: 45px; }
}
@media (min-height: 760px) {
  @container extract (min-width: 875px) {
    .traffic-extract__rail { position: sticky; top: 85px; }
  }
}
@container extract (min-width: 1080px) {
  .traffic-extract__locations { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container extract (min-width: 480px) and (max-width: 1079px) {
  .traffic-extract__locations > :first-child { grid-column: 1 / -1; }
}
@container extract (max-width: 479px) {
  .traffic-extract__heading { margin-bottom: 17px; }
  .traffic-extract__allowance { display: grid; justify-items: end; flex-shrink: 0; gap: 0; font-size: .73rem; }
  .traffic-extract__config, .traffic-extract__generation, .traffic-extract__results { padding: 17px; }
  .traffic-extract__fields, .traffic-extract__refine-fields { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .traffic-extract__refine-fields { padding-inline: 11px; }
  .traffic-extract__preview { padding-inline: 17px; }
}
@container extract (max-width: 350px) {
  .traffic-extract__output-fields .traffic-extract__fields { grid-template-columns: minmax(0, 1fr); }
  .traffic-extract__session-options label { padding-inline: 8px; }
}
@media (prefers-reduced-motion: no-preference) {
  .traffic-extract :is(.dash-button, summary, .traffic-extract__field input, .traffic-extract__field select, .traffic-extract__session-options label, .traffic-extract__target-method label) {
    transition: border-color .16s ease, box-shadow .16s ease, color .16s ease;
  }
}
@media (prefers-reduced-motion: reduce) {
  .traffic-extract .dash-button { transition: none; }
}
@media (forced-colors: active) {
  .traffic-extract__field select, .traffic-extract__check input { appearance: auto; }
  .traffic-extract__field:has(> select)::after, .traffic-extract__check input:checked::before { content: none; }
  .traffic-extract__session-options label:has(input:checked),
  .traffic-extract__target-method label:has(input:checked),
  .traffic-extract__mode .dash-button[aria-pressed='true'] { border: 1px solid Highlight; outline: 1px solid Highlight; }
}
