/* Research workspace: deliberate motion, wider comparisons, progressive detail. */
html { scroll-behavior: smooth; }
main { max-width: 1680px; padding: 0 3.5%; }
.header, .university-bar { padding-left: 3.5%; padding-right: 3.5%; }
.workspace { grid-template-columns: 222px minmax(0,1fr); gap: 26px; }
.results-area { min-width: 0; scroll-margin-top: 20px; }
.hero { position: relative; }
.hero-copy { animation: enter-content .5s ease both; }
.hero-art { box-shadow: 0 12px 35px #163e2f0a; animation: enter-content .6s .08s ease both; }
.hero-art:hover { box-shadow: 0 16px 40px #163e2f14; }
.explore-cta span { display: inline-block; margin-left: 10px; transition: transform .18s; }
.explore-cta:hover span { transform: translateY(3px); }
.result-stats { position: relative; overflow: hidden; background: linear-gradient(115deg,#123f2e,#1b5e43); gap: clamp(25px,5vw,90px); box-shadow: 0 6px 20px #123f2e12; }
.result-stats:after { content: ''; position: absolute; width: 220px; height: 220px; right: -70px; top: -145px; border: 1px solid #ffffff16; border-radius: 50%; pointer-events: none; box-shadow: 0 0 0 26px #ffffff05, 0 0 0 52px #ffffff04; }
.result-stats > div > span { display: inline-block; font-variant-numeric: tabular-nums; }
.priority-note { margin: -2px 0 11px; font-size: 10px; color: #536e5d; display: flex; align-items: center; gap: 6px; }
.priority-note button { padding: 0; color: #315e46; font-size: 12px; }
.search-bar { box-shadow: 0 2px 9px #123f2e05; transition: border-color .2s, box-shadow .2s; }
.search-bar:focus-within { border-color: #146348; box-shadow: 0 0 0 3px #14634816; }
.table-card { background: #fff; box-shadow: 0 5px 24px #193d2b09; overflow: hidden; position: relative; }
.table-toolbar { padding: 17px 18px; flex-wrap: wrap; }
.table-toolbar > div:first-child { display: block; }
.table-toolbar > div > span { display: block; margin-top: 4px; }
.table-toolbar h2 { font-size: 16px; }
.table-actions { gap: 10px; }
.view-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 18px 15px; flex-wrap: wrap; }
.view-presets { display: inline-flex; padding: 3px; gap: 2px; background: #edf2ee; border: 1px solid #d3dfd5; border-radius: 6px; }
.view-presets button { padding: 7px 13px; color: #446151; font-size: 12px; border-radius: 4px; transition: color .18s, background .18s, box-shadow .18s; }
.view-presets button[aria-pressed=true] { color: #164b33; background: #fff; font-weight: 700; box-shadow: 0 1px 4px #123f2e20; }
.view-presets button:hover { color: #073d29; background: #ffffffa8; }
.view-tools { display: flex; gap: 7px; }
.view-tools button { font-size: 12px; border: 1px solid #bfd0c3; color: #28543b; border-radius: 4px; padding: 7px 11px; background: #fff; }
.view-tools button:hover { border-color: #457457; background: #eff5ec; }
.view-tools button[aria-pressed=true] { border-color: #07583f; color: #07583f; background: #e8f1e6; }
.table-navigation { display: flex; align-items: center; justify-content: space-between; background: #f3f6f1; border-top: 1px solid #d7e2d6; padding: 5px 18px; color: #526b59; font-size: 10px; }
.table-navigation > div { display: flex; gap: 6px; }
.table-navigation button { font-size: 14px; padding: 0 8px; color: #285a3d; border-radius: 3px; }
.table-navigation button:hover { background: #dae8d7; }
.table-scroll { max-height: 760px; min-height: 120px; scrollbar-width: auto; scrollbar-color: #73947e #edf2eb; scroll-behavior: smooth; }
.table-scroll::-webkit-scrollbar { height: 12px; width: 10px; }
.table-scroll::-webkit-scrollbar-track { background: #edf2eb; }
.table-scroll::-webkit-scrollbar-thumb { background: #73947e; border: 3px solid #edf2eb; border-radius: 8px; }
#result-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; }
#result-table th { position: sticky; top: 0; z-index: 2; background: #244b37; height: 47px; padding: 12px 15px; }
#result-table th button { display: flex; justify-content: space-between; gap: 12px; width: 100%; font-size: 12px; }
#result-table th > span { font-size: 12px; }
#result-table td { padding: 13px 15px; height: 77px; vertical-align: middle; font-size: 12px; min-width: 100px; }
#result-table tbody tr { --row-color: #fff; background: var(--row-color); animation: enter-row .22s ease both; animation-delay: var(--row-delay,0ms); }
#result-table tbody tr:nth-child(even) { --row-color: #f6f8f4; }
#result-table tbody tr:hover, #result-table tbody tr.selected-row { --row-color: #e6eee0; }
#result-table .pinned-column { position: sticky; left: 0; z-index: 1; background: var(--row-color,#244b37); box-shadow: 1px 0 #ccdbcc; }
#result-table th.pinned-column { z-index: 4; background: #244b37; }
#result-table .pinned-secondary { position: sticky; left: var(--first-column-width,230px); z-index: 1; background: var(--row-color,#244b37); box-shadow: 2px 0 4px #234b3710; }
#result-table th.pinned-secondary { z-index: 3; background: #244b37; }
#result-table .identity-column { min-width: 175px; max-width: 240px; }
#result-table .pinned-column.identity-column { min-width: 205px; width: 230px; }
#result-table .identity-column .record-link { max-width: 230px; white-space: normal; text-align: left; line-height: 1.45; font-size: 12px; overflow-wrap: anywhere; }
#result-table .cell-sub { display: block; font-size: 10px; line-height: 1.5; color: #687e6c; margin-top: 3px; font-weight: 400; }
#result-table .cell-sub + .cell-sub { margin-top: 0; }
#result-table .numeric-column { text-align: right; }
#result-table .number { font-variant-numeric: tabular-nums; color: #23472e; }
#result-table .locus-column { min-width: 215px; }
#result-table .locus { font-family: ui-monospace, monospace; font-size: 11px; letter-spacing: -.3px; }
#result-table .annotation-column { min-width: 175px; max-width: 255px; white-space: normal; }
.cell-value { display: block; max-width: 300px; overflow: hidden; text-overflow: ellipsis; }
.annotation-column .cell-value { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.sequence { font-family: ui-monospace, monospace; font-size: 11px; letter-spacing: .5px; }
.muted, .unavailable { color: #7c8e7d; }
.evidence-tag { display: inline-flex; padding: 4px 7px; color: #657465; background: #eff2ec; border-radius: 4px; font-size: 11px; }
.evidence-tag.supported { background: #d9ecdb; color: #17643c; }
#result-table .open-column { position: sticky; right: 0; min-width: 42px; width: 42px; padding: 8px; z-index: 1; background: var(--row-color,#244b37); box-shadow: -1px 0 #d0ded0; }
#result-table th.open-column { z-index: 3; background: #244b37; }
.row-open { background: #e9f0e4; border-radius: 5px; width: 27px; height: 27px; transition: background .16s; }
.row-open:hover { background: #cbdcbd; }
.table-card[aria-busy=true] .table-scroll { opacity: .45; transition: opacity .15s; pointer-events: none; }
.table-card .loading { position: absolute; top: 150px; left: 50%; transform: translateX(-50%); background: #fff; color: #28513a; box-shadow: 0 4px 24px #173c3a20; border: 1px solid #c0d0c2; border-radius: 25px; font-size: 12px; padding: 10px 22px; z-index: 6; }
.pagination { background: #fbfcf9; border-top: 1px solid #d5e0d1; }
.pagination button { transition: background .15s, color .15s; }
.pagination button:not(:disabled):hover { color: #fff; background: #245c3c; }
.detail-dialog { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(690px,95vw); height: 100dvh; max-height: 100dvh; border-radius: 0; border: 0; border-left: 3px solid #245a3b; padding: 0 30px 30px; box-shadow: -15px 0 80px #15382126; }
.detail-dialog[open] { animation: enter-drawer .25s ease both; }
.detail-dialog .dialog-header { position: sticky; top: 0; z-index: 2; background: #fff; padding: 20px 0 15px; margin: 0; border-bottom: 1px solid #dbe5d7; }
.detail-nav { display: flex; align-items: center; gap: 10px; }
.detail-nav button { border: 1px solid #c9d8c5; border-radius: 4px; padding: 4px 9px; color: #315d3d; font-size: 16px; }
.detail-nav button:disabled { opacity: .35; }
.detail-position { font-size: 11px !important; color: #6a826c !important; margin: 16px 0 8px; }
.detail-dialog h2 { font-size: 30px; }
.detail-summary { border-left: 3px solid #40754d; border-radius: 0 5px 5px 0; line-height: 1.7; }
.detail-dialog::backdrop { background: #112d2261; backdrop-filter: blur(2px); }
.columns-dialog { width: min(760px,95vw); padding-bottom: 0; }
.columns-dialog[open] { animation: enter-content .2s ease both; }
#column-search { width: 100%; padding: 11px 12px; border: 1px solid #adc4af; border-radius: 5px; background: #f8faf6; font: inherit; font-size: 13px; color: #285438; }
.column-selection-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 15px 0; color: #4b6950; font-size: 12px; }
.column-selection-tools > div { display: flex; gap: 15px; }
.column-selection-tools button { color: #1c6338; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; padding: 0; }
#column-options fieldset { border: 0; border-top: 1px solid #d4e1cf; margin: 18px 0 0; padding: 13px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
#column-options legend { color: #244f33; padding: 0 10px 0 0; font-size: 13px; font-weight: 650; }
.column-option { display: flex; gap: 9px; padding: 7px 9px; border-radius: 4px; cursor: pointer; align-items: flex-start; color: #32523b; font-size: 12px; }
.column-option:hover, .column-option:has(input:checked) { background: #edf4e9; }
.column-option input { accent-color: #186044; margin: 3px 0 0; flex-shrink: 0; }
.column-option span { min-width: 0; }
.column-option small { display: block; font-size: 9px; color: #70836e; margin-top: 3px; overflow-wrap: anywhere; }
.column-option[hidden], #column-options fieldset[hidden] { display: none; }
.column-apply { position: sticky; bottom: 0; background: #fff; display: flex; gap: 15px; justify-content: space-between; align-items: center; padding: 15px 0 20px; border-top: 1px solid #c6d7c0; }
.column-apply p { font-size: 11px; }
.column-apply button { flex-shrink: 0; padding: 10px 15px; }
.focus-mode .hero, .focus-mode .release-strip, .focus-mode #notice, .focus-mode footer, .focus-mode .university-bar, .focus-mode .filters { display: none; }
.focus-mode main { max-width: none; padding: 24px 3%; }
.focus-mode .workspace { display: block; }
.focus-mode .header { height: 65px; }
.focus-mode .table-scroll { max-height: calc(100dvh - 260px); }
@keyframes enter-content { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@keyframes enter-row { from { opacity: .15; } to { opacity: 1; } }
@keyframes enter-drawer { from { opacity: .4; transform: translateX(35px); } to { opacity: 1; transform: translateX(0); } }
@media(max-width:1100px) {
  .workspace { grid-template-columns: 200px minmax(0,1fr); gap: 20px; }
  .view-toolbar { padding: 0 12px 12px; gap: 10px; }
  .table-toolbar { padding: 14px 12px; }
  .view-presets button { padding: 7px 9px; }
}
@media(max-width:900px) {
  .workspace { display: block; }
  .filters { margin-bottom: 20px; }
  .result-stats { gap: 20px; }
}
@media(max-width:620px) {
  main { padding: 0 5%; }
  .header, .university-bar { padding-left: 5%; padding-right: 5%; }
  .table-toolbar { align-items: flex-start; gap: 12px; }
  .table-actions { margin-left: auto; }
  .view-toolbar { gap: 10px; }
  .view-presets { flex: 1; }
  .view-presets button { flex: 1; }
  .view-tools { width: 100%; justify-content: space-between; }
  .table-navigation { padding-left: 12px; }
  #result-table .pinned-column.identity-column { min-width: 142px; max-width: 142px; width: 142px; }
  #result-table .pinned-column .record-link { max-width: 122px; }
  #result-table .pinned-secondary { position: static; box-shadow: none; }
  #result-table th.pinned-secondary { position: sticky; left: auto; }
  #result-table td { height: 75px; padding: 12px; }
  #result-table th { padding: 12px; }
  .detail-dialog { padding: 0 18px 24px; width: 96vw; }
  #column-options fieldset { grid-template-columns: 1fr; }
  .column-selection-tools { align-items: flex-start; }
  .column-selection-tools > div { flex-direction: column; gap: 8px; align-items: flex-end; }
  .column-apply p { max-width: 145px; }
  .focus-mode .table-scroll { max-height: 65dvh; }
}
@media(prefers-reduced-motion:reduce) {
  html, .table-scroll { scroll-behavior: auto; }
  *, *:before, *:after { animation: none !important; transition: none !important; }
}
