.decoder-shell { width: min(1180px, calc(100% - 40px)); }
.decoder-hero { margin-bottom: 6px; }
.decoder-nav { display: flex; justify-content: flex-end; gap: 16px; margin: -12px 0 24px; text-align: right; font-size: 14px; }
.decoder-nav a { color: #245c87; text-underline-offset: 4px; }
.decoder-intro { margin-top: 0; }
.decoder-note { margin: -4px 0 20px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.active-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.active-row > div { min-width: 0; }
.active-row strong { display: block; margin-bottom: 9px; font-size: 13px; }
.active-filters { display: flex; flex-wrap: wrap; gap: 7px; }
.empty-filter { color: var(--muted); font-size: 12px; }
.filter-tag { display: inline-flex; align-items: center; gap: 8px; padding: 7px 9px; color: #fff; background: var(--ink); border: 1px solid #42515d; font-size: 12px; }
.filter-tag button { padding: 0; color: #fff; background: none; font-size: 16px; line-height: 1; }
.guess-filter-tag { max-width: 100%; align-items: flex-start; background: #34302d; }
.guess-filter-copy { min-width: 0; line-height: 1.55; }
.guess-filter-copy strong, .guess-filter-copy small { display: block; }
.guess-filter-copy small { margin-top: 2px; color: #e5ded4; font-size: 10px; font-weight: 400; }
.guess-filter-tag .remove-guess { flex: 0 0 auto; margin-top: 1px; }
.candidate-summary { display: grid; grid-template-columns: auto auto 1fr; align-items: baseline; gap: 7px 10px; }
.candidate-summary > span { color: var(--muted); font-size: 13px; }
.candidate-summary > strong { color: var(--red); font: 800 34px/1 ui-monospace, monospace; }
.summary-bar { grid-column: 1 / -1; height: 6px; overflow: hidden; background: #ded8cd; }
.summary-bar i { display: block; width: 0; height: 100%; background: var(--red); transition: width .2s ease; }
.dimension-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.dimension-card { min-width: 0; margin: 0; }
.dimension-card header { display: flex; gap: 13px; align-items: flex-start; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.dimension-card header > span { padding-top: 4px; color: var(--red); font: 800 12px/1 ui-monospace, monospace; }
.dimension-card h2 { margin: 0 0 4px; font-size: 17px; }
.dimension-card header p { margin: 0; color: var(--muted); font-size: 12px; }
.distribution { display: grid; gap: 7px; max-height: 320px; margin-top: 14px; padding-right: 5px; overflow: auto; scrollbar-width: thin; }
.distribution-option { position: relative; display: grid; grid-template-columns: minmax(88px, 1fr) auto auto; gap: 9px; align-items: center; width: 100%; min-height: 39px; padding: 8px 10px; overflow: hidden; color: var(--ink); background: #fff; border: 1px solid var(--line); text-align: left; }
.distribution-option::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--share); background: rgba(185,59,46,.08); pointer-events: none; }
.distribution-option > * { position: relative; z-index: 1; }
.distribution-option:hover { border-color: var(--red); }
.distribution-option.selected { color: #fff; background: var(--ink); border-color: var(--ink); }
.distribution-option.selected::before { background: rgba(255,255,255,.08); }
.distribution-option b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.distribution-option span { color: var(--muted); font: 11px/1 ui-monospace, monospace; }
.distribution-option.selected span { color: #e7e1d8; }
.distribution-option em { min-width: 48px; color: var(--red); text-align: right; font: normal 800 12px/1 ui-monospace, monospace; }
.distribution-option.selected em { color: #ffd9d2; }
.recommendation-panel, .candidate-panel { margin-top: 18px; }
.recommendation-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.recommendation-note { margin: 16px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.recommendation-list { display: grid; gap: 9px; margin-top: 15px; }
.recommendation-item { display: grid; grid-template-columns: 34px minmax(180px, 1fr) repeat(4, auto); gap: 10px 18px; align-items: center; width: 100%; padding: 12px 14px; color: var(--ink); background: #fff; border: 1px solid var(--line); text-align: left; }
.recommendation-item:hover { border-color: var(--red); box-shadow: 3px 3px 0 rgba(185,59,46,.12); }
.recommendation-rank { color: var(--red); font: 800 15px/1 ui-monospace, monospace; }
.recommendation-name { min-width: 0; }
.recommendation-name strong, .recommendation-name small { display: block; }
.recommendation-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.recommendation-name small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.recommendation-metric { min-width: 76px; text-align: right; }
.recommendation-metric span, .recommendation-metric b { display: block; }
.recommendation-metric span { color: var(--muted); font-size: 9px; }
.recommendation-metric b { margin-top: 3px; font: 800 12px/1.2 ui-monospace, monospace; }
.recommendation-metric.primary-metric b { color: var(--red); font-size: 14px; }
.hint-analysis { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.hint-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.hint-head h3 { margin: 0 0 4px; font-size: 15px; }
.hint-head p { margin: 0; color: var(--muted); font-size: 11px; }
.hint-head > span { flex: 0 0 auto; padding: 5px 8px; color: var(--red-dark); background: #fff4f1; border: 1px solid rgba(185,59,46,.25); font-size: 10px; }
.hint-context { margin: 14px 0 0; padding: 11px 13px; color: var(--ink); background: #fff; border-left: 3px solid var(--red); font-size: 12px; line-height: 1.65; }
.hint-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.hint-summary-item { padding: 10px; background: #fff; border: 1px solid var(--line); }
.hint-summary-item span, .hint-summary-item strong { display: block; }
.hint-summary-item span { color: var(--muted); font-size: 9px; }
.hint-summary-item strong { margin-top: 4px; font: 800 13px/1.3 ui-monospace, monospace; }
.hint-list { display: grid; gap: 6px; margin-top: 10px; }
.hint-row { display: grid; grid-template-columns: minmax(80px, 1fr) repeat(3, auto); gap: 10px 18px; align-items: center; padding: 9px 11px; background: rgba(255,255,255,.55); border: 1px solid var(--line); font-size: 11px; }
.hint-row strong { font-size: 12px; }
.hint-row span { color: var(--muted); }
.hint-row b { color: var(--red-dark); font: 800 11px/1 ui-monospace, monospace; }
.candidate-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.candidate-search { width: min(310px, 100%); }
.candidate-search span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; }
.candidate-search input { width: 100%; padding: 10px 12px; color: var(--ink); background: #fff; border: 1px solid var(--line); font: 13px/1.4 "Microsoft YaHei UI", sans-serif; outline: 0; }
.candidate-search input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(185,59,46,.1); }
.feedback-help { margin-top: 5px !important; color: var(--red-dark) !important; }
.candidate-columns, .candidate-row { display: grid; grid-template-columns: minmax(300px, 1.7fr) repeat(6, minmax(72px, .65fr)); gap: 8px; align-items: center; }
.candidate-columns { margin-top: 18px; padding: 0 13px 8px; color: var(--muted); font-size: 10px; }
.candidate-list { display: grid; gap: 7px; }
.candidate-row { width: 100%; min-height: 54px; padding: 7px 9px; color: var(--ink); background: #fff; border: 1px solid var(--line); text-align: left; }
.candidate-row:hover { border-color: #bdb5aa; }
.candidate-name-cell { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.candidate-name-button { min-width: 0; overflow: hidden; padding: 7px 3px; color: var(--ink); background: none; text-align: left; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.candidate-name-button:hover, .candidate-name-button:focus-visible { color: var(--red); text-decoration: underline; text-underline-offset: 3px; outline: 0; }
.add-feedback-button { flex: 0 0 auto; padding: 7px 8px; color: var(--red-dark); background: #fff7f5; border: 1px solid rgba(185,59,46,.38); font-size: 10px; white-space: nowrap; }
.add-feedback-button:hover, .add-feedback-button:focus-visible { color: #fff; background: var(--red); outline: 0; }
.match-toggle { min-width: 0; min-height: 36px; overflow: hidden; padding: 6px 5px; color: #4f5c65; background: #faf9f6; border: 1px solid transparent; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.match-toggle:hover { border-color: #c7bfb4; }
.match-toggle[aria-pressed="true"] { color: #fff; background: var(--red); border-color: var(--red-dark); box-shadow: 2px 2px 0 rgba(116,34,27,.18); }
.match-toggle[aria-pressed="true"]::after { content: " ✓"; }
.match-toggle.auto-match[aria-pressed="true"] { background: var(--ink); border-color: #4d5a64; }
.match-toggle::before { display: none; color: var(--muted); font-size: 9px; }
.match-toggle[aria-pressed="true"]::before { color: #ffd8d2; }
.show-more { display: block; min-width: 180px; margin: 24px auto 0; }
.empty-candidates { padding: 36px 0 20px; color: var(--muted); text-align: center; }
.decoder-footer p { margin: 4px 0; }
@media (max-width: 760px) {
  .decoder-shell { width: min(100% - 24px, 1180px); }
  .dimension-grid { grid-template-columns: 1fr; }
  .active-row, .candidate-head, .recommendation-head { align-items: stretch; flex-direction: column; }
  .active-row .secondary, .candidate-search { width: 100%; }
  .distribution { max-height: 270px; }
  .recommendation-item { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 9px; }
  .recommendation-metric { min-width: 0; }
  .recommendation-metric:nth-of-type(n+3) { display: none; }
  .hint-head { flex-direction: column; gap: 8px; }
  .hint-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hint-row { grid-template-columns: 1fr auto; gap: 5px 10px; }
  .hint-row span:nth-of-type(2) { display: none; }
  .candidate-columns { display: none; }
  .candidate-list { margin-top: 16px; }
  .candidate-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; padding: 11px; }
  .candidate-name-cell { grid-column: 1 / -1; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
  .candidate-name-button { font-size: 13px; }
  .match-toggle { min-height: 44px; white-space: normal; line-height: 1.35; }
  .match-toggle::before { display: block; content: attr(data-label); }
}
