/* /leaderboards/explore: every company on every board in one table. Loaded after styles.css and leaderboards.css.
   Layout: the site page frame, then one wide sheet: view tabs, one toolbar, a fixed-height grid, and a company panel
   on the right. Rules: a filter never moves the page; hover and controls never resize anything; yellow means "named". */
.ex-wrap { max-width: 1368px; }
.ex-sheet { padding: 22px 0 56px; }
.ex-n { color: var(--ink-4); font-weight: 400; }

.ex-views { display: flex; gap: 22px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.ex-views::-webkit-scrollbar { display: none; }
.ex-view { position: relative; flex: none; background: none; border: 0; padding: 6px 0 10px; font: 400 14.5px/1.4 "Geist", sans-serif; color: var(--ink-3); cursor: pointer; white-space: nowrap; }
.ex-view .ex-n { margin-left: 6px; font-size: 13px; }
.ex-view:hover { color: var(--ink); }
/* The selected tab keeps its width: weight 600 would shift its neighbor, so the ink line carries the state. */
.ex-view[aria-selected="true"] { color: var(--ink); }
.ex-view[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); }
.ex-view:focus-visible { box-shadow: none; text-decoration: underline; text-underline-offset: 4px; }

.ex-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 0; }
.ex-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--chalk); color: var(--ink);
  font: 500 14px/1 "Geist", sans-serif; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .15s, transform .12s var(--ease-out); }
.ex-btn:hover { background: var(--chalk-2); }
.ex-btn:active { transform: scale(.97); }
.ex-btn svg { flex: none; }
.ex-btn.ex-ink { background: var(--ink); color: var(--paper); }
.ex-btn.ex-ink:hover { background: #2a2a28; }
.ex-btn[aria-pressed="true"], .ex-btn.is-on { background: var(--yellow-soft); }
.ex-btn:focus-visible { outline: none; box-shadow: inset 0 -2px 0 0 currentColor; }
#ex-indn { display: inline-block; min-width: 18px; text-align: left; }

.ex-search { position: relative; flex: 1 1 220px; max-width: 320px; min-width: 0; }
.ex-search svg { position: absolute; left: 11px; top: 11px; color: var(--ink-4); pointer-events: none; }
/* Text entry: a neutral perimeter in every state. Focus darkens the fill and the gray edge, and shows the ink caret. */
.ex-field { width: 100%; height: 36px; margin: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); padding: 0 12px; font: 400 14.5px/1 "Geist", sans-serif; color: var(--ink);
  caret-color: var(--ink); outline: none; box-shadow: none; -webkit-appearance: none; appearance: none; transition: background-color .15s, border-color .15s; }
.ex-field::placeholder { color: var(--ink-4); }
.ex-field:hover { border-color: var(--line-strong); }
.ex-field:focus, .ex-field:focus-visible, .ex-field:invalid, .ex-field:-webkit-autofill { border-color: var(--ink-3); outline: none; box-shadow: none; }
.ex-field:focus { background: var(--chalk); }
.ex-field::-webkit-search-decoration, .ex-field::-webkit-search-cancel-button { -webkit-appearance: none; }
.ex-search .ex-field { padding-left: 34px; }
.ex-pick { position: relative; }
.ex-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.ex-count { font-size: 13.5px; color: var(--ink-3); white-space: nowrap; }

.ex-pop { position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; width: 272px; max-height: min(420px, 60vh); overflow-y: auto; background: var(--paper); border-radius: 14px; box-shadow: var(--shadow-3); padding: 8px;
  opacity: 0; transform: translateY(-4px) scale(.985); transform-origin: top left; transition: opacity .15s var(--ease-out), transform .15s var(--ease-out); }
.ex-pop.in { opacity: 1; transform: none; }
.ex-pop h3 { margin: 8px 8px 4px; font-size: 12px; font-weight: 500; color: var(--ink-4); letter-spacing: 0; }
.ex-opt { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 0 8px; border: 0; background: none; border-radius: 8px; text-align: left; font: 400 14.5px/1.2 "Geist", sans-serif; color: var(--ink); cursor: pointer; }
.ex-opt:hover, .ex-opt:focus-visible { background: var(--chalk); box-shadow: none; outline: none; }
.ex-box { width: 16px; height: 16px; border-radius: 5px; background: var(--chalk-2); flex: none; display: grid; place-items: center; transition: background-color .12s; }
.ex-opt:hover .ex-box { background: var(--line-strong); }
.ex-opt[aria-checked="true"] .ex-box { background: var(--ink); }
.ex-opt[aria-checked="true"] .ex-box::after { content: ""; width: 8px; height: 4px; border-left: 2px solid var(--paper); border-bottom: 2px solid var(--paper); transform: rotate(-45deg) translate(1px, -1px); }
.ex-opt .ex-n { margin-left: auto; font-size: 13px; }

/* Grid: a fixed height, so a filter never moves the page. The header row and the Company column stay in view. */
.ex-grid { position: relative; height: clamp(420px, calc(100vh - 330px), 760px); overflow: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper); overscroll-behavior: contain; }
/* Fixed column widths: a filter or a sort never changes a column. */
.ex-table { border-collapse: separate; border-spacing: 0; table-layout: fixed; width: 100%; min-width: 1196px; font-size: 14px; }
.ex-table th:nth-child(2) { width: 220px; } .ex-table th:nth-child(3) { width: 176px; } .ex-table th:nth-child(4) { width: 108px; }
.ex-table th:nth-child(n+5):nth-child(-n+7) { width: 84px; } .ex-table th:nth-child(8) { width: 136px; } .ex-table th:nth-child(9) { width: 104px; }
.ex-table thead th { position: sticky; top: 0; z-index: 3; background: var(--chalk); text-align: left; font-weight: 500; font-size: 12.5px; color: var(--ink-3); height: 36px; padding: 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ex-table thead th button { display: flex; align-items: center; gap: 5px; width: 100%; height: 36px; padding: 0 10px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.ex-table thead th.num button { justify-content: flex-end; }
.ex-table thead th button:hover, .ex-table thead th[aria-sort="ascending"], .ex-table thead th[aria-sort="descending"] { color: var(--ink); }
.ex-table .lb-sorticon { width: 9px; text-align: center; }
.ex-table .lb-sorticon::after { content: "\2195"; font-size: 11px; color: var(--ink-4); opacity: 0; transition: opacity .12s; }
.ex-table th button:hover .lb-sorticon::after, .ex-table th button:focus-visible .lb-sorticon::after { opacity: 1; }
.ex-table th[aria-sort="ascending"] .lb-sorticon::after { content: "\2191"; color: var(--ink); opacity: 1; }
.ex-table th[aria-sort="descending"] .lb-sorticon::after { content: "\2193"; color: var(--ink); opacity: 1; }
.ex-table tbody td { height: 40px; padding: 0 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--paper); }
.ex-table td + td, .ex-table th + th { border-left: 1px solid var(--line); }
.ex-table .num { text-align: right; }
.ex-r { cursor: pointer; }
.ex-r:hover td { background: var(--chalk); }
.ex-r.is-sel td { background: var(--yellow-soft); }
.ex-table th.ex-co, .ex-table td.ex-co { position: sticky; left: 0; z-index: 2; width: 200px; }
.ex-table thead th.ex-co { z-index: 4; }
.ex-open { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 9px; width: 100%; height: 39px; cursor: pointer; }
.ex-open:focus-visible { box-shadow: inset 0 -2px 0 0 currentColor; }
.ex-nm { font-weight: 500; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ex-pill { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; height: 22px; line-height: 22px; padding: 0 9px; border-radius: 6px; background: var(--chalk); font-size: 12.5px; color: var(--ink-2); transition: background-color .12s; }
.ex-r:hover .ex-pill, .ex-r.is-sel .ex-pill { background: var(--paper); }
.ex-share { display: grid; grid-template-columns: minmax(48px, 1fr) 38px 64px; align-items: center; gap: 8px; }
.ex-track { height: 6px; border-radius: 3px; background: var(--chalk-2); overflow: hidden; }
.ex-r:hover .ex-track, .ex-r.is-sel .ex-track { background: var(--line); }
.ex-track i { display: block; height: 100%; width: var(--p); background: var(--yellow-deep); border-radius: 3px; }
.ex-share b { font-weight: 500; text-align: right; }
.ex-share .of { font-size: 12.5px; text-align: right; }
.ex-g td { position: sticky; top: 36px; z-index: 2; height: 34px !important; background: var(--paper); font-weight: 600; font-size: 13px; border-left: 0; }
.ex-g td span { position: sticky; left: 10px; }
.ex-g .ex-n { margin-left: 6px; position: static; }
.ex-none { position: sticky; left: 0; display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; max-width: 100vw; height: 240px; margin: 0; color: var(--ink-3); font-size: 14.5px; }

/* Layers: the company panel and the export dialog sit above the site header. */
.ex-scrim { position: fixed; inset: 0; z-index: 140; background: rgba(17,17,17,.18); opacity: 0; transition: opacity .18s; }
.ex-scrim.in { opacity: 1; }
.ex-panel { position: fixed; z-index: 141; top: 12px; right: 12px; bottom: 12px; width: min(400px, calc(100vw - 24px)); background: var(--paper);
  border-radius: 18px; box-shadow: var(--shadow-3); padding: 20px; overflow-y: auto; overscroll-behavior: contain; transform: translateX(24px); opacity: 0; transition: transform .22s var(--ease-out), opacity .18s; }
.ex-panel.in { transform: none; opacity: 1; }
.ex-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 9px; background: none; cursor: pointer; color: var(--ink-3); display: grid; place-items: center; transition: background-color .15s, color .15s; }
.ex-x:hover, .ex-x:focus-visible { background: var(--chalk); color: var(--ink); outline: none; box-shadow: none; }
.ex-id { display: flex; align-items: center; gap: 12px; padding-right: 40px; }
.ex-id .lg { width: 36px; height: 36px; border-radius: 9px; }
.ex-id .lg-mono { --s: 36px; }
.ex-id h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; font-weight: 650; line-height: 1.15; min-width: 0; overflow-wrap: anywhere; }
.ex-id small { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-3); font-weight: 400; letter-spacing: 0; }
.ex-desc { margin: 14px 0 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
.ex-owner { margin: 6px 0 0; font-size: 13px; color: var(--ink-3); }
.ex-cite { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0 0; padding: 12px; background: var(--chalk); border-radius: 12px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.ex-cite p { margin: 0; flex: 1; min-width: 0; }
.ex-copy { flex: none; height: 30px; width: 78px; padding: 0; font-size: 13px; background: var(--paper); }
.ex-copy:hover { background: var(--paper); box-shadow: 0 0 0 1px var(--line-strong); }
.ex-copy span { display: inline-flex; align-items: center; gap: 5px; }
.ex-copy.is-done span { animation: ex-pop .28s var(--ease-out); }
@keyframes ex-pop { from { opacity: 0; transform: translateY(3px) scale(.94); } }
.ex-apps { margin: 18px 0 0; display: grid; gap: 10px; }
.ex-app { display: grid; grid-template-columns: 84px 1fr auto; align-items: center; gap: 10px; font-size: 14px; }
.ex-dots { display: flex; gap: 5px; flex-wrap: wrap; }
.ex-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--chalk-2); }
.ex-dots i.on { background: var(--yellow-deep); }
.ex-act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

.ex-dlg { position: fixed; z-index: 151; left: 50%; top: 50%; width: min(420px, calc(100vw - 32px)); transform: translate(-50%, -48%) scale(.98); opacity: 0; background: var(--paper); border-radius: 18px; box-shadow: var(--shadow-3); padding: 24px;
  transition: transform .2s var(--ease-out), opacity .16s; }
.ex-dlg.in { transform: translate(-50%, -50%); opacity: 1; }
.ex-dlg h2 { margin: 0; font-size: 22px; letter-spacing: -.03em; font-weight: 650; padding-right: 36px; }
.ex-dlg form { display: grid; gap: 10px; margin-top: 16px; }
.ex-dlg .ex-field { height: 44px; font-size: 16px; }
.ex-dlg .ex-btn { height: 44px; font-size: 15px; }
.ex-err { min-height: 18px; margin: -4px 0 0; font-size: 13px; line-height: 18px; color: #B3261E; }
.ex-tick { width: 40px; height: 40px; border-radius: 50%; background: var(--yellow); display: grid; place-items: center; margin-bottom: 14px; animation: ex-pop .3s var(--ease-out); }
.ex-tick::after { content: ""; width: 14px; height: 7px; border-left: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: rotate(-45deg) translateY(-2px); }
.ex-done p { margin: 8px 0 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }

@media (max-width: 760px) {
  .ex-right { margin-left: 0; width: 100%; }
  .ex-right .ex-btn { flex: 1; height: 44px; }
  .ex-count { display: none; }
  .ex-search { max-width: none; flex-basis: 100%; }
  .ex-field { font-size: 16px; height: 44px; }
  .ex-search svg { top: 15px; }
  .ex-bar .ex-btn { height: 44px; }
  .ex-pick, #ex-grp { flex: 1; }
  .ex-pick .ex-btn { width: 100%; }
  .ex-pop { width: min(300px, calc(100vw - 32px)); }
  .ex-opt { min-height: 44px; }
  .ex-grid { height: clamp(380px, calc(100vh - 300px), 620px); margin-inline: calc(var(--gutter) * -1); }
  .ex-table { min-width: 1152px; }
  .ex-table th.ex-co, .ex-table td.ex-co { width: 156px; }
  .ex-panel { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 82vh; transform: translateY(24px); }
  .ex-x { width: 44px; height: 44px; top: 8px; right: 8px; }
  .ex-panel .ex-act .ex-btn, .ex-done .ex-act .ex-btn { flex: 1 1 100%; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .ex-btn, .ex-pop, .ex-scrim, .ex-panel, .ex-dlg, .ex-pill, .ex-field { transition: none; }
  .ex-copy.is-done span, .ex-tick { animation: none; }
}
