.research-page { max-width: 1380px; margin: 0 auto; padding: 1.5rem; letter-spacing: 0; }
.research-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.research-heading h1 { font-size: 1.9rem; margin: 0; }
.research-heading p { margin: .4rem 0 0; }
.research-current-season { display:flex; flex-direction:column; align-items:flex-end; gap:.2rem; padding:.55rem .75rem; border:1px solid var(--border); border-radius:5px; background:var(--bg-card); }
.research-current-season span { color:var(--text-muted); font-size:.72rem; }
.research-current-season strong { font-size:.95rem; }
.research-page select, .research-page input { background: var(--bg-card); border: 1px solid var(--border); border-radius: 5px; color: var(--text); padding: .55rem .7rem; max-width: 100%; font: inherit; }
.research-free { color: var(--accent); border-left: 1px solid var(--border); margin-left: .6rem; padding-left: .6rem; font-size: .8rem; }
.research-source { display: flex; gap: .6rem 1.5rem; flex-wrap: wrap; font-size: .8rem; color: var(--text-muted); margin: 1.1rem 0; }
.research-roles, .research-views { display: flex; flex-wrap: wrap; gap: .4rem; }
.research-roles { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); max-width:920px; gap:8px; margin:1.3rem 0; padding:0; }
.research-roles button, .research-views button { background: transparent; color: var(--text-muted); border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: .65rem .85rem; cursor: pointer; font: inherit; }
.research-roles button[aria-pressed=true], .research-views button[aria-pressed=true] { color: var(--accent); border-color: var(--accent); }
.research-roles button { display:flex; align-items:center; gap:12px; border:1px solid var(--border); border-radius:6px; background:var(--bg-card); padding:12px; min-height:62px; font-size:.92rem; font-weight:650; color:var(--text); }
.research-roles button[data-role=F] { --role-accent:var(--accent); --role-tint:var(--tint-success); }
.research-roles button[data-role=D] { --role-accent:var(--primary); --role-tint:var(--tint-primary); }
.research-roles button[data-role=G] { --role-accent:var(--warning); --role-tint:var(--tint-warning); }
.research-roles button[data-role=S] { --role-accent:var(--info); --role-tint:var(--tint-info); }
.research-roles button[data-role=S] .role-letter { font-size:.75rem; }
.research-roles .role-letter { display:grid; place-items:center; width:32px; height:32px; flex:0 0 32px; color:var(--role-accent); background:var(--role-tint); border-radius:4px; font-size:1rem; font-weight:800; }
.research-roles button[aria-pressed=true] { border-color:var(--role-accent); background:var(--role-tint); color:var(--role-accent); box-shadow:inset 0 -2px 0 var(--role-accent); }
.research-roles button:hover { border-color:var(--role-accent); }
.research-page button:focus-visible, .research-page a:focus-visible { outline: 2px solid var(--info); outline-offset: 3px; }
.research-toolbar { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; padding-top: 1rem; }
.research-views { flex-basis:100%; display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); border-bottom:1px solid var(--border); gap:8px; margin-bottom:8px; }
.research-views button { display:flex; flex-direction:column; align-items:flex-start; text-align:left; gap:3px; font-size:.85rem; font-weight:650; padding:10px 8px; }
.research-views button small { color:var(--text-muted); font-size:.7rem; font-weight:400; line-height:1.3; }
.research-views button[aria-pressed=true] small { color:inherit; }
#research-saved-count { display:inline-block; font-size:.72rem; background:var(--bg-input); color:var(--text); min-width:20px; padding:1px 5px; border-radius:4px; }
.research-sort-label { display:flex; align-items:center; gap:8px; font-size:.8rem; margin:0; }
.research-sort-label select { width:auto; max-width:190px; }
.research-exports { display:flex; gap:8px; margin-left:auto; }
.research-exports button { min-height:38px; border-radius:5px; }
#research-pdf { color:var(--primary); border-color:var(--primary); background:var(--tint-primary); }
#research-pdf[aria-busy=true] { opacity:.6; cursor:wait; }
.research-exports button:disabled { opacity:.5; cursor:default; }
.research-search { margin:0; }
.research-search input { width: 235px; }
#research-view-note, #research-count { font-size: .8rem; margin: .65rem 0; }
#research-view-note { padding:.65rem .75rem; border-left:3px solid var(--info); background:var(--tint-info); color:var(--text); line-height:1.45; }
.research-signal-guide { display:flex; gap:.45rem; align-items:baseline; flex-wrap:wrap; padding:.55rem .7rem; border:1px solid var(--border); border-radius:5px; background:var(--bg-card); color:var(--text-muted); font-size:.76rem; line-height:1.45; }
.research-signal-guide strong { color:var(--text); }
.research-table-wrap { overflow-x: auto; }
.research-table { width: 100%; border-collapse: collapse; font-size: .83rem; table-layout: fixed; min-width: 1200px; }
.research-table th { text-align: right; font-size: .72rem; color: var(--text-muted); padding: .65rem .4rem; }
.research-table th button { display:flex; gap:4px; align-items:center; justify-content:flex-end; width:100%; border:0; background:transparent; padding:8px 0; font:inherit; font-weight:650; color:inherit; cursor:pointer; text-align:right; min-height:42px; }
.research-table th button span { flex-shrink:0; color:var(--text-muted); }
.app-ui .research-table th[aria-sort=ascending],.app-ui .research-table th[aria-sort=descending] { color:var(--accent); background:var(--tint-success); }
.research-table th button:hover { color:var(--primary); }
.research-table th:nth-child(2) button { justify-content:flex-start; text-align:left; }
.research-table tbody tr:not(.research-tier):hover { background:var(--bg-card); }
.research-table.incoming-table { min-width:850px; }

.research-table td { padding: .4rem .4rem; border-top: 1px solid var(--border); text-align: right; font-variant-numeric: tabular-nums; }
.research-table th:first-child, .research-table td:first-child { width: 34px; text-align: center; }
.research-table th:nth-child(2), .research-table td:nth-child(2) { width: 500px; text-align: left; }
.research-name { display: flex; gap: .6rem; align-items: center; min-width: 0; }
.research-name img { width: 30px; height: 30px; object-fit: contain; flex: 0 0 30px; }
.research-name a { font-weight: 650; overflow-wrap: anywhere; }
.research-name small { display: block; color: var(--text-muted); font-size: .71rem; margin-top: .2rem; }
.research-signals { display:inline-flex; flex-wrap:wrap; gap:4px; }
.research-badge { color: var(--warning); font-size: .65rem; border: 1px solid #dcc58f; background:var(--tint-warning); border-radius: 3px; padding: .08rem .3rem; }
.research-tier td { background: var(--tint-success); color: var(--accent); font-size: .75rem; font-weight: 650; text-align: left !important; }
.research-save { width: 30px; height: 32px; padding: 0; border: 0; background: transparent; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; }
.research-save[aria-pressed=true] { color: var(--warning); }
.positive { color: var(--accent); }.negative { color: var(--danger); }
.research-pagination { display: flex; gap: 1rem; align-items: center; justify-content: center; padding: 1rem; }
.research-pagination button:disabled { opacity: .3; cursor: default; }
.research-notice { color: var(--warning); padding: .7rem 0; font-size: .85rem; }
.research-method { border-top: 1px solid var(--border); padding: 1rem 0; font-size: .85rem; color: var(--text-muted); line-height: 1.6; }
.research-method summary { color: var(--text); font-weight: 600; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
@media (max-width: 900px) and (min-width: 721px) {
  .research-views { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .research-page { padding: 1rem; }
  .research-heading h1 { font-size: 1.6rem; }
  .research-current-season { width:100%; align-items:flex-start; }
  .research-search, .research-search input { width: 100%; }
  .research-views button { padding: .5rem; font-size: .85rem; }
  .research-views { grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
  .research-roles { grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
  .research-roles button { flex-direction:column; gap:7px; padding:10px 3px; font-size:.8rem; min-height:86px; }
  .research-sort-label { flex:1; min-width:0; }
  .research-sort-label select { max-width:155px; }
  .research-table { min-width: 1180px; }
  .research-table th:nth-child(2), .research-table td:nth-child(2) { width: 460px; }
}
.research-table.incoming-table th:first-child, .research-table.incoming-table td:first-child { width:90px; text-align:center; }
.research-table.incoming-table th:first-child button { justify-content:center; text-align:center; }
.research-table.incoming-table th:nth-child(2), .research-table.incoming-table td:nth-child(2) { width:290px; }
.research-table.incoming-table td { overflow-wrap:anywhere; }
.research-table th button { overflow-wrap:anywhere; }
.research-name .research-photo { width:32px; height:32px; flex-basis:32px; border-radius:4px; background:var(--bg-input); }
.research-identity { min-width:0; flex:1; }
.research-name-line { display:flex; align-items:center; flex-wrap:wrap; gap:4px 8px; }
.research-name-line a { flex-shrink:0; max-width:100%; }
.research-export-note { font-size:.75rem; margin:8px 0; }
