/* Styles for impact rankings, Supreme Court, lectures and the guide. */
.topnav { overflow-x: auto; scrollbar-width: none; }
.topnav::-webkit-scrollbar { display: none; }
.topnav a { white-space: nowrap; }
.topbar-inner { gap: 18px; }
.topsearch { max-width: 340px; }

/* citations */
.cites { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.cites svg { width: 13px; height: 13px; fill: currentColor; stroke: none; opacity: .55; }
.cites b { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 1px 6px; border-radius: 5px; margin-left: 4px; }
.rv { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); border: 1px solid var(--line-2); border-radius: 5px; padding: 0 6px; }
.impact-meter { height: 6px; background: var(--bg-sunk); border-radius: 6px; margin: 6px 0 4px; overflow: hidden; }
.impact-meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: 6px; }
.kv small { color: var(--ink-3); font-size: 12px; }

/* impact ranking */
.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rank li { display: grid; grid-template-columns: 44px 1fr 92px; gap: 14px; align-items: center; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; transition: border-color .15s, box-shadow .2s; }
.rank li:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.rank-n { font: 400 26px/1 var(--serif); color: var(--ink-3); text-align: center; font-variant-numeric: tabular-nums; }
.rank li:nth-child(-n+3) .rank-n { color: var(--accent); }
.rank-t { font: 500 18px/1.3 var(--serif); }
.rank-t:hover { color: var(--accent); }
.rank-m { font-size: 13px; color: var(--ink-3); margin: 3px 0 8px; }
.rank-m a:hover { color: var(--accent); }
.rank-bar { height: 4px; background: var(--bg-sunk); border-radius: 4px; overflow: hidden; }
.rank-bar i { display: block; height: 100%; background: var(--accent); opacity: .7; border-radius: 4px; }
.rank-c { text-align: right; }
.rank-c b { display: block; font: 500 22px/1 var(--serif); font-variant-numeric: tabular-nums; }
.rank-c span { font-size: 11px; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

/* features on home */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.feature { display: flex; flex-direction: column; gap: 8px; padding: 22px; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); transition: all .18s; }
.feature:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.feature b { font: 500 21px/1.2 var(--serif); }
.feature span:not(.f-icon) { color: var(--ink-3); font-size: 14px; flex: 1; }
.feature em { font-style: normal; color: var(--accent); font-weight: 600; font-size: 14px; }
.f-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 19px; }

/* supreme court */
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); padding: 4px 0; cursor: pointer; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.tag-audio { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.abstract.plain { font-size: 18px; color: var(--ink-2); }
.abstract.plain::first-letter { font-size: inherit; float: none; padding: 0; color: inherit; line-height: inherit; }
.callout { border-left: 3px solid var(--accent); background: var(--bg-elev); padding: 14px 18px; border-radius: 0 10px 10px 0; font: 400 17px/1.6 var(--serif); }
.article h2 small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.prose-sm p { font: 400 17px/1.65 var(--serif); margin: 0 0 12px; color: var(--ink); }
.muted-line { color: var(--ink-3); font-size: 14px; display: flex; align-items: center; gap: 10px; }
.muted-line a { color: var(--accent); }
.attrib { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.spinner.sm { width: 16px; height: 16px; border-width: 2px; flex-shrink: 0; }
.vote { display: flex; align-items: baseline; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.vote b { font: 500 30px/1 var(--serif); }
.vote span { color: var(--ink-3); font-size: 13px; }

.player { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.player-tabs { display: flex; overflow-x: auto; border-bottom: 1px solid var(--line); background: var(--bg-sunk); }
.player-tabs button { border: 0; background: none; padding: 12px 16px; text-align: left; cursor: pointer; color: var(--ink-2); font-size: 13.5px; border-bottom: 2px solid transparent; white-space: nowrap; }
.player-tabs button small { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); font-weight: 700; }
.player-tabs button.on { color: var(--ink); border-bottom-color: var(--accent); background: var(--bg-elev); }
.player-controls { padding: 16px 18px 12px; background: var(--bg-elev); border-bottom: 1px solid var(--line); }
.player-controls audio { width: 100%; height: 40px; }
.player-opts { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 10px; }
.transcript { max-height: 520px; overflow-y: auto; padding: 8px 10px 16px; position: relative; }
.turn { padding: 10px 12px; border-radius: 10px; cursor: pointer; transition: background .15s; border-left: 3px solid transparent; }
.turn:hover { background: var(--bg-sunk); }
.turn-h { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; margin-bottom: 3px; }
.turn-h b { color: var(--ink); }
.turn.justice .turn-h b { color: var(--accent); }
.turn-h span { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.turn p { margin: 0; color: var(--ink-2); font: 400 15.5px/1.55 var(--serif); }
.turn.now { background: var(--accent-soft); border-left-color: var(--accent); }
.turn.now p { color: var(--ink); }

/* lectures */
.lec-filters { display: flex; gap: 12px; flex-wrap: wrap; }
.lec-search { flex: 1; min-width: 240px; display: flex; align-items: center; gap: 8px; background: var(--bg-elev); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; }
.lec-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--focus); }
.lec-search svg { color: var(--ink-3); }
.lec-search input { flex: 1; border: 0; outline: 0; background: none; padding: 9px 0; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px 16px; }
.vgrid.small { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.vtile { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 6px; border-radius: 12px; }
.vtile:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.vthumb { position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: var(--bg-sunk); border: 1px solid var(--line); display: block; }
.vthumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; display: block; }
.vtile:hover .vthumb img { transform: scale(1.04); }
.vlen { position: absolute; right: 8px; bottom: 8px; background: rgb(0 0 0 / .78); color: #fff; font-size: 11.5px; font-weight: 600; padding: 2px 6px; border-radius: 5px; }
.vplay { position: absolute; inset: 0; margin: auto; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: rgb(0 0 0 / .55); color: #fff; font-size: 18px; opacity: 0; transition: opacity .2s; }
.vtile:hover .vplay { opacity: 1; }
.vt { font: 500 16px/1.3 var(--serif); color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vtile:hover .vt { color: var(--accent); }
.vm { font-size: 12.5px; color: var(--ink-3); }
.modal { position: fixed; inset: 0; z-index: 200; background: rgb(8 9 12 / .78); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 24px; animation: fade .2s ease both; }
.modal-box { width: min(1100px, 100%); background: var(--bg-elev); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-lg); }
.modal-video { aspect-ratio: 16/9; background: #000; }
.modal-video iframe, .embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.modal-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 18px; }
.modal-foot b { display: block; font: 500 17px/1.3 var(--serif); }
.modal-foot span { font-size: 13px; color: var(--ink-3); }

/* guide */
.guide-hero::after { opacity: .35; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.guide-card { display: flex; gap: 14px; padding: 14px; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); transition: all .18s; }
.guide-card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.guide-thumb { flex: 0 0 116px; aspect-ratio: 16/10; border-radius: 9px; overflow: hidden; background: var(--bg-sunk); }
.guide-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.guide-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.guide-body b { font: 500 18px/1.2 var(--serif); }
.guide-card:hover .guide-body b { color: var(--accent); }
.guide-body > span { font-size: 13.5px; color: var(--ink-3); }
.guide-body > .guide-meta { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; margin-top: auto; }
.guide-tagline { font: italic 400 21px/1.45 var(--serif); color: var(--ink-2); margin: -4px 0 26px; }
.explainer { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px 22px 28px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.explainer::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
.explainer-h { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; text-transform: uppercase; letter-spacing: .09em; font-weight: 700; color: var(--ink-3); margin-bottom: 10px; }
.explainer-h a { color: var(--accent); text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 13px; }
.explainer p { font: 400 18.5px/1.65 var(--serif); margin: 0; }
.explainer-f { font-size: 12.5px; color: var(--ink-3); margin-top: 14px; }
.explainer-f a { color: var(--accent); }
.embed { aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow); }
.embed-cap { font-size: 13px; color: var(--ink-3); margin-top: 10px; }
.embed-cap b { color: var(--ink-2); font-weight: 600; }
.guide-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 40px; }
.guide-nav a { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); font: 500 17px/1.3 var(--serif); transition: all .15s; }
.guide-nav a:hover { border-color: var(--accent); color: var(--accent); }
.guide-nav small { display: block; font: 600 11.5px var(--sans); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); margin-bottom: 4px; }
.toc li { padding: 7px 0; }
.toc a.t { font-size: 14.5px; }
.toc a.cur { color: var(--accent); }

@media (max-width: 1100px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) {
  .features { grid-template-columns: 1fr; }
  .rank li { grid-template-columns: 32px 1fr; }
  .rank-c { grid-column: 2; text-align: left; display: flex; gap: 8px; align-items: baseline; }
  .guide-nav { grid-template-columns: 1fr; }
}

/* ---- generated video thumbnails (uniform across Lectures and the guide) */
.vthumb-gen { display: flex; flex-direction: column; padding: 14px 16px 12px; text-align: left; color: #f4efe6;
  background:
    radial-gradient(120% 90% at 100% 0%, rgb(194 86 47 / .45), transparent 60%),
    radial-gradient(90% 80% at 0% 100%, rgb(64 92 140 / .35), transparent 60%),
    linear-gradient(160deg, #1d2333, #12151d);
  border: 1px solid rgb(255 255 255 / .06); }
.vthumb-gen::after { content: "§"; position: absolute; right: -6px; bottom: -34px; font: 400 130px/1 var(--serif); color: rgb(255 255 255 / .05); pointer-events: none; }
.vg-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vg-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgb(240 138 93 / .16); color: #f5a27c; border: 1px solid rgb(240 138 93 / .28); }
.vg-icon svg { width: 18px; height: 18px; stroke-width: 1.7; }
.vg-brand { font: 500 10.5px var(--serif); letter-spacing: .02em; color: rgb(244 239 230 / .5); }
.vg-brand em { color: rgb(245 162 124 / .7); }
.vg-title { margin-top: auto; font: 500 16px/1.22 var(--serif); letter-spacing: -.005em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; padding-right: 8px; }
.vg-ch { margin-top: 6px; font: 600 10.5px var(--sans); letter-spacing: .07em; text-transform: uppercase; color: #f5a27c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70%; }
.vthumb-gen .vlen { background: rgb(255 255 255 / .12); backdrop-filter: blur(4px); }
.vthumb-gen .vplay { background: rgb(240 138 93 / .9); color: #1a0f0a; }
.vtile:hover .vthumb-gen { border-color: rgb(240 138 93 / .45); }
.vtile:hover .vthumb-gen .vg-title { color: #fff; }
.vthumb-gen.big { padding: 30px 34px 26px; border-radius: var(--radius); }
.vthumb-gen.big .vg-icon { width: 46px; height: 46px; border-radius: 13px; }
.vthumb-gen.big .vg-icon svg { width: 26px; height: 26px; }
.vthumb-gen.big .vg-brand { font-size: 13px; }
.vthumb-gen.big .vg-title { font-size: clamp(22px, 3vw, 32px); -webkit-line-clamp: 3; max-width: 85%; }
.vthumb-gen.big .vg-ch { font-size: 12.5px; margin-top: 10px; }
.vthumb-gen.big .vplay { width: 72px; height: 72px; font-size: 24px; opacity: 1; }
.vthumb-gen.big::after { font-size: 260px; bottom: -70px; }
.vm { margin-top: 2px; }

/* ---- guide video carousel */
.vcarousel { position: relative; outline: none; }
.vc-stage .embed { margin: 0; }
.vc-poster { all: unset; display: block; width: 100%; cursor: pointer; border-radius: var(--radius); box-shadow: var(--shadow); }
.vc-poster .vthumb { display: flex; aspect-ratio: 16/9; position: relative; overflow: hidden; }
.vc-poster:hover .vplay { transform: scale(1.06); }
.vc-poster .vplay { transition: transform .2s; }
.vc-poster:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.vc-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2);
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent); backdrop-filter: blur(8px); color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; box-shadow: var(--shadow); transition: all .15s; z-index: 2; padding-bottom: 3px; }
.vc-nav:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.vc-prev { left: -22px; }
.vc-next { right: -22px; }
.vc-foot { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 10px; }
.vc-cap { margin: 0; }
.vc-count { margin-left: 10px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.vc-dots { display: flex; gap: 6px; flex-shrink: 0; }
.vc-dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; background: var(--line-2); cursor: pointer; transition: all .15s; }
.vc-dots button.on { background: var(--accent); width: 22px; border-radius: 6px; }
@media (max-width: 720px) { .vc-prev { left: 8px; } .vc-next { right: 8px; } .vthumb-gen.big { padding: 18px 20px; } }

/* vote split with justice panel */
.vote { flex-wrap: wrap; position: relative; border-radius: 10px; }
.vote.has-pop { cursor: help; outline: none; }
.vote.has-pop:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.vote-dots { flex-basis: 100%; display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.vote-dots i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--accent); }
.vote-dots i.on { background: var(--accent); }
.vote-dots small { margin-left: 8px; font-size: 11.5px; color: var(--ink-3); }
.vote-pop { display: none; position: absolute; z-index: 40; right: 0; top: calc(100% + 6px); width: 320px; max-width: 80vw; grid-template-columns: 1fr 1fr; gap: 14px;
  padding: 14px 16px; background: var(--bg-elev); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-lg); }
.vote.has-pop:hover .vote-pop, .vote.has-pop:focus .vote-pop, .vote.has-pop:focus-within .vote-pop { display: grid; }
.vote-pop h5 { margin: 0 0 6px; font: 700 10.5px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.vote-pop ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.vote-pop li { font-size: 13.5px; color: var(--ink); line-height: 1.3; }
.vote-pop li em { display: block; font-style: normal; font-size: 11.5px; color: var(--accent); }
.vote-pop p { margin: 0; font-size: 13px; color: var(--ink-3); }
.vote-src { margin: 6px 0 0; font-size: 11.5px; color: var(--ink-3); }
.vote-src a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.vote .vote-pop li span { color: var(--ink); font-size: 13.5px; }
.vote-pop::before { content: ''; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.vote .vote-pop li a { color: var(--ink); font-size: 13.5px; text-decoration: none; border-bottom: 1px solid var(--line-2); }
.vote .vote-pop li a:hover { color: var(--accent); border-color: var(--accent); }

/* top bar: the tabs never scroll or clip; the search box gives up width first, then moves to its own row */
.topnav { flex-shrink: 0; overflow: visible; }
.topsearch { flex: 1 1 220px; min-width: 150px; }
@media (max-width: 1180px) {
  .topnav a { padding: 7px 9px; }
  .topbar-inner { gap: 14px; }
}
@media (max-width: 1240px) {
  .topbar-inner { flex-wrap: wrap; row-gap: 10px; }
  .topsearch { order: 3; flex-basis: 100%; max-width: none; }
}
@media (max-width: 860px) {
  .topnav { flex-shrink: 1; min-width: 0; overflow-x: auto; }
}
