/* "Our picks" on /leaderboard (scripts/build-leaderboard-picks.js).
   Lives inside .lb-terminal, so it uses the --lb-* tokens, which already
   flip for light and dark. The #1 card is the one inverted surface. */

.op { margin: 8px 0 56px; color: var(--lb-text); }
.op-kicker { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--lb-muted); }

.op > .op-kicker { margin: 0 0 12px; font-weight: 400; }
.op-signals { list-style: none; margin: 0 0 28px; padding: 0; counter-reset: sig; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--lb-text); border-bottom: 1px solid var(--lb-line); }
.op-signals li { counter-increment: sig; display: flex; flex-direction: column; gap: 4px; padding: 12px 16px 14px 0; font-size: 12.5px; line-height: 1.5; color: var(--lb-muted); }
.op-signals li + li { padding-left: 16px; border-left: 1px solid var(--lb-line); }
.op-signals b { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--lb-text); }
.op-signals b::before { content: counter(sig, decimal-leading-zero) "  "; white-space: pre; color: var(--lb-muted); font-weight: 400; }

/* Tabs: a segmented bar. Without JS every board shows, one after another. */
.op-tabs { display: none; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--lb-text); border-radius: 999px; padding: 4px; gap: 4px; margin: 0 0 28px; max-width: 620px; }
.op.has-tabs .op-tabs { display: grid; }
.op-tab { appearance: none; border: 0; background: none; color: var(--lb-text); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; padding: 10px 6px; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s; }
.op-tab:hover { background: var(--lb-track); }
.op-tab[aria-selected="true"] { background: var(--lb-text); color: var(--lb-on-accent); }
.op-tab:focus-visible { outline: 2px solid var(--lb-text); outline-offset: 2px; }
.op.has-tabs .op-board:not(.is-active) { display: none; }
.op:not(.has-tabs) .op-board + .op-board { margin-top: 56px; }
.op-board.is-active { animation: op-in .35s ease-out; }
@keyframes op-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.op-board-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 24px; align-items: end; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--lb-text); }
.op-board-name { margin: 0; font-family: ui-serif, Georgia, serif; font-style: italic; font-weight: 900; font-size: clamp(26px, 3vw, 36px); letter-spacing: -.03em; line-height: 1.05; }
.op-board-dek { grid-column: 1; margin: 0; max-width: 680px; font-size: 14px; line-height: 1.6; color: var(--lb-muted); }
.op-board-more { grid-column: 2; grid-row: 1 / span 2; align-self: end; font-size: 12px; color: var(--lb-text); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; white-space: nowrap; }
.op--single .op-kicker { margin-bottom: 14px; }

/* Podium */
.op-podium { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 14px; }
.op-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 22px 22px 20px; border: 1px solid var(--lb-text); border-radius: 14px; background: var(--lb-panel-bg); transition: transform .2s ease, box-shadow .2s ease; }
.op-card:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--lb-text); }
.op-card--1 { background: var(--lb-text); color: var(--lb-on-accent); }
.op-card--1:hover { box-shadow: 6px 6px 0 var(--lb-muted); }
.op-card .op-rank { font-family: ui-serif, Georgia, serif; font-style: italic; font-weight: 900; font-size: 64px; line-height: .8; letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 1.5px var(--lb-text); }
.op-card--1 .op-rank { -webkit-text-stroke-color: var(--lb-on-accent); }
.op-card .op-name { font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; color: inherit; text-decoration: none; }
.op-card .op-name::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.op-verdict { margin: 0; font-size: 14px; line-height: 1.6; opacity: .82; }
.op-card .op-ev { margin-top: auto; }

/* Evidence chips */
.op-ev { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.op-chip { display: inline-flex; align-items: baseline; gap: 5px; padding: 5px 9px; border: 1px solid var(--lb-line); border-radius: 999px; font-family: var(--mono); font-size: 11px; line-height: 1.3; color: var(--lb-muted); white-space: nowrap; position: relative; z-index: 1; cursor: help; }
.op-chip b { color: var(--lb-text); font-weight: 700; }
.op-chip i { font-style: normal; opacity: .75; }
.op-chip--open { border-color: var(--lb-text); }
.op-chip--none { border-style: dashed; }
.op-chip--up i { opacity: 1; font-weight: 700; color: var(--lb-text); }
.op-card--1 .op-chip { border-color: color-mix(in srgb, var(--lb-on-accent) 28%, transparent); color: color-mix(in srgb, var(--lb-on-accent) 70%, transparent); }
.op-card--1 .op-chip b, .op-card--1 .op-chip--up i { color: var(--lb-on-accent); }
.op-card--1 .op-chip--open { border-color: var(--lb-on-accent); }

/* Rows 4+ */
.op-rows { list-style: none; margin: 14px 0 0; padding: 0; }
.op-row { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) minmax(0, auto); gap: 8px 16px; align-items: center; padding: 14px 8px; border-bottom: 1px solid var(--lb-line); transition: background .15s; }
.op-row:hover { background: var(--lb-track); }
.op-row .op-rank { font-family: ui-serif, Georgia, serif; font-style: italic; font-weight: 900; font-size: 22px; color: var(--lb-muted); }
.op-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.op-row .op-name { font-size: 15px; font-weight: 700; color: var(--lb-text); text-decoration: none; }
.op-row .op-name::after { content: ""; position: absolute; inset: 0; }
.op-tag { font-size: 12.5px; line-height: 1.45; color: var(--lb-muted); }
.op-row .op-ev { justify-content: flex-end; max-width: 520px; }

.op-src { margin: 16px 0 0; font-size: 11px; line-height: 1.7; color: var(--lb-muted); }
.op-src a { color: var(--lb-text); }

@media (max-width: 1100px) {
  .op-signals { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .op-signals li:nth-child(4) { padding-left: 0; border-left: 0; }
  .op-signals li:nth-child(n+4) { border-top: 1px solid var(--lb-line); }
}
@media (max-width: 900px) {
  .op-podium { grid-template-columns: minmax(0, 1fr); }
  .op-row { grid-template-columns: 34px minmax(0, 1fr); }
  .op-row .op-ev { grid-column: 2; justify-content: flex-start; }
}
@media (max-width: 560px) {
  .op-tabs { max-width: none; }
  .op-tab { font-size: 11px; padding: 9px 2px; letter-spacing: .02em; }
  .op-board-head { grid-template-columns: minmax(0, 1fr); }
  .op-board-more { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 4px; }
  .op-card { padding: 18px; }
  .op-card .op-rank { font-size: 48px; }
  /* Phones: the five names in one line; each chip explains itself on tap. */
  .op-signals { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 0; margin-bottom: 20px; }
  .op-signals li, .op-signals li + li { padding: 0; border: 0; }
  .op-signals span { display: none; }
  .op-chip { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .op-board.is-active { animation: none; }
  .op-card, .op-card:hover { transition: none; transform: none; }
}
