:root{font-family:Inter,"Segoe UI","Microsoft YaHei",sans-serif;color:#182c3a;background:#f3f6f8;font-size:14px;--muted:#627889;--teal:#087f8c;--line:#e0e8ed}*{box-sizing:border-box}body{margin:0}header{height:72px;background:#112d3d;display:flex;align-items:center;justify-content:space-between;padding:0 4%;color:white}.brand{font-size:24px;font-weight:800;text-decoration:none;color:white;letter-spacing:1px}.brand span{font-size:15px;font-weight:400;letter-spacing:0;margin-left:20px;color:#bcd1dc}.badge{border:1px solid #526d7b;border-radius:30px;padding:6px 14px;font-size:12px}main{max-width:1600px;margin:auto;padding:36px 4%}.eyebrow{font-size:11px;letter-spacing:2px;font-weight:700;color:var(--teal)}h1{font-size:32px;margin:12px 0;letter-spacing:-1px}p{color:var(--muted);line-height:1.7;margin:8px 0}h2{font-size:20px;margin:8px 0}.intro{margin-bottom:26px}.panel{background:white;border:1px solid var(--line);border-radius:12px;margin-bottom:22px;overflow:hidden;box-shadow:0 3px 8px #142e3c03}.filters{padding:20px;display:flex;gap:14px;flex-wrap:wrap;align-items:flex-end}label{font-size:12px;color:var(--muted);display:flex;flex-direction:column;gap:7px}input,select{font:inherit;color:#203a49;background:#fff;border:1px solid #cbd8df;border-radius:6px;padding:10px;min-height:39px;max-width:100%}label.product{min-width:175px}label.word{flex:1;min-width:220px}button{border:0;background:var(--teal);border-radius:6px;color:white;font:inherit;padding:11px 18px;cursor:pointer;white-space:nowrap}button:disabled{opacity:.45;cursor:default}.quiet{background:#edf4f6;color:#2c596e;font-size:12px}.scope-line{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:24px 0 16px;font-size:13px}.metrics{display:grid;grid-template-columns:repeat(6,1fr);gap:14px;margin-bottom:22px}.metric{background:white;border:1px solid var(--line);border-radius:10px;padding:20px}.metric small{color:var(--muted);display:block}.metric strong{font-size:30px;display:block;margin-top:10px;font-variant-numeric:tabular-nums}.metric:nth-child(2) strong{color:var(--teal)}.metric:nth-child(4) strong{color:#ba4b32}.section-head{display:flex;justify-content:space-between;gap:20px;align-items:center;padding:24px}.section-head p{font-size:12px}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;font-size:13px;text-align:left;white-space:nowrap}th{font-weight:500;background:#f6f9fb;color:var(--muted);padding:13px 20px}td{padding:15px 20px;border-top:1px solid #edf1f4;font-variant-numeric:tabular-nums}tbody tr:hover{background:#f7fbfc}.keyword-btn{color:#17495c;background:none;padding:0;text-align:left;font-weight:600;border-radius:0;border-bottom:1px dotted #9fb8c4}.improved{color:#078064}.declined{color:#be4935}.insufficient{color:#8b7a53}.chip{font-size:11px;padding:4px 8px;border-radius:5px;background:#f1f5f7}.priority-0,.priority-1,.priority-2{background:#fff0e9;color:#a64c25}.pager{padding:16px 22px;display:flex;justify-content:flex-end;align-items:center;gap:18px;color:var(--muted);font-size:12px}.chart{padding:0 24px;height:290px}.chart svg{width:100%;height:100%;overflow:visible}.point{cursor:pointer}.point:hover{r:6}.point-detail{padding:15px 24px;background:#f7fafb;color:#4f6878;font-size:12px;line-height:1.8;min-height:54px}.methodology{padding:20px 24px;font-size:12px;line-height:1.9;color:var(--muted)}summary{cursor:pointer;font-size:14px;color:#28495b;font-weight:600}.methodology p{overflow-wrap:anywhere}#notice{color:#687e8b;margin:12px 0;line-height:1.8}#error{background:#fff0e9;color:#a13e2f;padding:18px;border-radius:8px;margin:16px 0}.stale{opacity:.5;pointer-events:none}footer{padding:20px 4%;border-top:1px solid var(--line);color:#83949e;font-size:12px;display:flex;justify-content:space-between}.bid-list{white-space:normal;min-width:240px;max-width:440px}.bid-list div{border-top:1px solid var(--line);padding:9px 0;font-size:11px;overflow-wrap:anywhere}.empty{text-align:center;padding:55px;color:var(--muted)}:focus-visible{outline:3px solid #32afc5;outline-offset:3px}[hidden]{display:none!important}@media(max-width:900px){main{padding:25px 18px}.metrics{grid-template-columns:repeat(3,1fr)}.section-head{align-items:flex-start;flex-direction:column}.scope-line{align-items:flex-start;flex-direction:column}h1{font-size:26px}.filters label{flex:1;min-width:140px}.filters button{width:100%}.chart{padding:0 10px}td,th{padding:12px}.brand span{margin-left:8px}}@media(max-width:480px){.metrics{grid-template-columns:repeat(2,1fr)}.metric{padding:15px}.brand{font-size:20px}footer span{display:none}}

/* Compact workspace: keep daily rows visible in the initial viewport. */
header{height:48px}
main{max-width:1760px;padding:16px 3%}
.intro{display:flex;align-items:baseline;gap:18px;margin-bottom:12px}
.intro h1{font-size:24px;margin:0;letter-spacing:0}
.intro p{font-size:12px;margin:0}
.panel{margin-bottom:12px;border-radius:8px}
.scope-line{margin:8px 0;gap:8px;font-size:12px}
.scope-line button{padding:7px 12px}
.metrics{gap:8px;margin-bottom:12px}
.metric{padding:10px 12px;border-radius:7px;display:flex;align-items:center;justify-content:space-between;gap:8px}
.metric small{font-size:14px;font-weight:600;line-height:1.4;color:#405b6c}
.metric strong{font-size:24px;margin:0}
#rank-matrix .section-head{padding:10px 14px;gap:12px;align-items:center;flex-direction:row}
#rank-matrix h2{font-size:18px;margin:0 0 4px}
.matrix-help summary{font-size:12px;font-weight:400;color:var(--muted)}
.matrix-help p{max-width:1000px;margin:5px 0}
#rank-matrix .section-head label{gap:3px;flex-shrink:0}
#rank-matrix .section-head input{min-height:32px;padding:6px 8px}
#notice{font-size:12px;margin:6px 0;line-height:1.5;overflow-wrap:anywhere}
.rank-matrix-wrap{max-height:680px;overflow:auto;isolation:isolate}
.rank-matrix-table{border-collapse:separate;border-spacing:0;font-size:13px}
.rank-matrix-table th,.rank-matrix-table td{padding:11px 14px;border-right:1px solid #edf1f4}
.rank-matrix-table thead th{position:sticky;top:0;z-index:3;background:#eaf2f6;font-weight:600;color:#24495e}
.rank-matrix-table th:first-child,.rank-matrix-table td:first-child{position:sticky;left:0;min-width:240px;max-width:300px;background:#fff;z-index:2;box-shadow:2px 0 3px #17384a0a;white-space:normal}
.rank-matrix-table thead th:first-child{z-index:4;background:#eaf2f6}
.rank-matrix-table tbody tr:hover td{background:#f2f8fa}
.rank-matrix-table .rank-day{min-width:102px;text-align:right;font-variant-numeric:tabular-nums}
.rank-matrix-table th:nth-child(2){min-width:125px}
.rank-matrix-table th:nth-child(3){min-width:160px}
.rank-delta{display:block;font-size:11px;font-weight:400;margin-top:4px;opacity:.85}
.rank-missing{color:#95a3ab;background:#fafbfc}
@media(max-width:600px){.rank-matrix-table th:first-child,.rank-matrix-table td:first-child{min-width:140px;max-width:140px}.rank-matrix-wrap{max-height:560px}}

.simple-filters{padding:22px 24px}
.product-filters,.analysis-filters,.advanced-fields{display:flex;align-items:flex-end;gap:16px;flex-wrap:wrap}
.product-filters label{min-width:130px}.product-filters .product{flex:1;min-width:260px}
.product-filters .product select{width:100%}.analysis-filters{border-top:1px solid var(--line);padding-top:18px;margin-top:20px;align-items:center}
.rank-tabs{display:flex;background:#edf3f6;padding:4px;border-radius:8px}.rank-tabs button{background:transparent;color:#5a7080;padding:9px 17px}.rank-tabs button[aria-pressed=true]{background:#087f8c;color:white;box-shadow:0 2px 4px #183d4820}
.period-label{flex-direction:row;align-items:center}.period-label select{min-width:115px}
#custom-dates{display:flex;gap:10px;align-items:center}#custom-dates label{flex-direction:row;align-items:center}#date-caption{color:var(--muted);font-size:12px}#query{margin-left:auto}
#advanced-filters{margin-top:18px}#advanced-filters summary{font-size:12px;font-weight:400;color:#627889}.advanced-fields{padding:15px 0 0}.advanced-fields .word{flex:1;min-width:220px}
#selection-hint,#catalog-hint{font-size:12px;margin:12px 0 0}#catalog-hint{color:#977342}
@media(max-width:750px){.simple-filters{padding:18px}.product-filters{gap:12px}.product-filters label{flex:1;min-width:110px}.product-filters .product{min-width:100%}.analysis-filters{gap:12px}#custom-dates{flex-wrap:wrap}#custom-dates input{max-width:155px}#date-caption{width:100%}#query{margin-left:0}#manualAsinMode{padding:8px 0;background:none}.period-label{gap:8px}}

.comparison-summary{display:flex;gap:16px;padding:0 24px 20px;flex-wrap:wrap}.comparison-card{border:1px solid var(--line);border-left:3px solid var(--rank-color);border-radius:7px;padding:12px 16px;display:grid;gap:7px;min-width:250px;flex:1}.comparison-card strong{display:flex;align-items:center;gap:9px;color:var(--rank-color)}.comparison-card small{color:var(--muted)}.legend-line{width:25px;border-top:3px solid var(--rank-color)}.legend-line.sponsored{border-top-style:dashed}

.comparison-card{font-size:16px;line-height:1.4}
.comparison-card small{font-size:14px;color:#405b6c}
.comparison-card .insufficient{color:#796239}
#trend-word{font-size:16px;min-height:40px;width:360px;max-width:100%}
.section-head:has(#trend-word)>label{font-size:14px;color:#405b6c;min-width:0;max-width:100%}
#trend-description,#details-description,.point-detail{font-size:14px;color:#405b6c}
#details{font-size:14px}
.loading-spinner{display:inline-block;width:14px;height:14px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:loading-spin .75s linear infinite;flex-shrink:0;vertical-align:middle}
.loading-dots{display:inline-block;overflow:hidden;width:3ch;white-space:nowrap;font-family:monospace;vertical-align:bottom;animation:loading-dots 1.2s steps(3,end) infinite}
#notice:has(.loading-spinner){display:flex;align-items:center;gap:9px;color:var(--teal)}
#query .loading-spinner{margin-right:8px}
body[data-loading=rank] #matrix-title::after,body[data-loading=rank] #trend-title::after{content:"";display:inline-block;width:14px;height:14px;margin-left:10px;border:2px solid var(--teal);border-right-color:transparent;border-radius:50%;animation:loading-spin .75s linear infinite}
@keyframes loading-spin{to{transform:rotate(360deg)}}
@keyframes loading-dots{0%{width:0}100%{width:3ch}}
@media(prefers-reduced-motion:reduce){.loading-spinner,.loading-dots,body[data-loading=rank] #matrix-title::after,body[data-loading=rank] #trend-title::after{animation:none}.loading-dots{width:3ch}}

.matrix-sort{display:inline-flex;align-items:center;gap:8px;padding:5px 0;background:transparent;color:inherit;font-size:12px;font-weight:600;border-radius:3px}.matrix-sort span{font-size:10px;color:#6d929e}.rank-matrix-table th[aria-sort=ascending] .matrix-sort,.rank-matrix-table th[aria-sort=descending] .matrix-sort{color:#087f8c}.rank-matrix-table #matrix-status{display:block;min-height:29px;width:150px;font-size:11px;padding:4px 6px;margin-top:5px;font-weight:400}.rank-matrix-table .rank-day{min-width:118px}.pager{flex-wrap:wrap}

.rank-matrix-table #matrix-status{background:white;color:#315368;text-align:left;border:1px solid #cbd8df;cursor:pointer;white-space:normal}
#status-menu{position:fixed;z-index:1000;width:272px;padding:12px;background:white;border:1px solid #cbd8df;border-radius:8px;box-shadow:0 8px 26px #17384a25;max-height:calc(100vh - 16px);overflow:auto}
#status-menu label{display:flex;flex-direction:row;align-items:center;gap:9px;padding:7px 4px;color:#254858;cursor:pointer}#status-menu label:hover{background:#f0f7f9}#status-menu input{width:15px;height:15px;min-height:0;margin:0;accent-color:#087f8c}.status-menu-head{display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:12px}.status-menu-head button{padding:4px;font-size:11px;background:none;color:#087f8c}#status-menu p{font-size:11px;margin:6px 0}

/* Compact filter controls override the original spacious layout. */
.simple-filters{padding:12px 14px;margin-bottom:6px}
.simple-filters label{gap:4px}
.simple-filters input,.simple-filters select{min-height:32px;padding:6px 8px}
.simple-filters button{padding:8px 12px}
.product-filters,.analysis-filters{gap:10px}
.analysis-filters{padding-top:8px;margin-top:10px}
.rank-tabs{padding:3px}
.rank-tabs button{padding:6px 12px}
#advanced-filters{display:inline-block;vertical-align:top;margin-top:8px;margin-right:14px}
#advanced-filters[open]{display:block}
#selection-hint{display:inline-block;margin-top:8px;font-size:11px}
#catalog-hint{margin-top:6px}
.advanced-fields{padding-top:8px}
.rank-matrix-table th,.rank-matrix-table td{padding:8px 12px}
@media(max-width:1100px){.metric{flex-direction:column;align-items:flex-start;gap:3px}}
@media(max-width:750px){
 main{padding:12px}.intro{gap:4px;flex-direction:column;margin-bottom:10px}
 .intro h1{font-size:21px}.simple-filters{padding:10px}
 .metrics{grid-template-columns:repeat(3,1fr);gap:6px}
 .metric{padding:8px}.metric strong{font-size:21px}
 #rank-matrix .section-head{flex-wrap:wrap;align-items:flex-start}
 #rank-matrix .section-head label{width:100%}
 #selection-hint{display:block}.scope-line{overflow-wrap:anywhere}
 .analysis-filters{gap:8px}#date-caption{width:auto}
}

/* Emphasize frequently scanned controls and values, keeping supporting copy quiet. */
.simple-filters label,.section-head>label{font-size:14px;font-weight:600;color:#405b6c}
.simple-filters select,.simple-filters input,#trend-word,#search{font-size:14px;font-weight:600}
#trend-word{font-size:16px}
button,.rank-tabs button{font-weight:600}
#date-caption,#active-scope{font-size:14px;font-weight:600;color:#334e60}
#advanced-filters summary{font-weight:600}
thead th,.rank-matrix-table thead th{font-size:14px;font-weight:700;color:#24495e}
.matrix-sort{font-size:14px;font-weight:700}
.keyword-btn{font-size:14px;font-weight:700}
.rank-matrix-table td{font-size:14px}
.rank-matrix-table td:nth-child(2),.rank-matrix-table td.rank-day:not(.rank-missing){font-weight:600}
.rank-matrix-table td strong{font-weight:700}
.rank-delta{font-size:13px;font-weight:600;opacity:1}
.rank-matrix-table #matrix-status{font-size:13px;font-weight:600}
#status-menu label{font-size:14px;font-weight:600}
.comparison-card>span,.comparison-card small{font-weight:600}
#chart svg>text{font-weight:600}
#details td:nth-child(-n+4){font-weight:600}
input::placeholder{font-weight:400}
