/* News selection */

/* the two fold-out boxes */
.fold { margin-top: 28px; border-radius: 26px; border: 1px solid; }
.fold + .fold { margin-top: 20px; }
.fold-aired { background: #F4EFFA; border-color: #E3D8F1; }
.fold-missed { background: var(--sky); border-color: var(--sky-line); }
.fold-head { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 20px; padding: 26px 30px; border-radius: 26px; }
.fold-head::-webkit-details-marker { display: none; }
.fold-head:hover .fold-chev { background: #fff; }
.fold-text { flex: 1; display: grid; gap: 6px; }
.fold-head h2 { font-size: clamp(24px, 3vw, 32px); display: flex; align-items: center; gap: 12px; }
.fold-count { font-size: 15px; font-weight: 800; letter-spacing: 0; padding: 4px 12px; border-radius: 999px; background: #fff; color: var(--ink-2); }
.fold-aired .fold-count { color: var(--brand); }
.fold-missed .fold-count { color: #2F6FB5; }
.fold-sub { font-size: 15.5px; color: var(--ink-2); }
.fold-chev { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .6); color: var(--ink-2); flex: none; transition: transform .25s, background .2s; }
.fold[open] .fold-chev { transform: rotate(180deg); }
.fold-body { padding: 0 18px 18px; }
.fold[open] .fold-body { animation: unfold .3s ease-out; }
@keyframes unfold { from { opacity: 0; transform: translateY(-6px); } }
.upvote-intro { margin: 0 12px 18px; font-size: 16px; color: var(--ink-2); max-width: 820px; }
.upvote-intro strong { color: var(--ink); font-size: 18px; display: block; margin-bottom: 4px; }
.filter-row { display: flex; align-items: center; gap: 12px; margin: 0 12px 12px; }
.filter-row .filters { flex: 1; margin: 0; }
.votes-left { position: relative; display: inline-flex; align-items: center; gap: 9px; border: 0; background: var(--brand); color: #fff; border-radius: 999px; padding: 9px 20px 9px 14px; cursor: pointer; font: inherit; flex: none; box-shadow: 0 4px 14px rgba(109, 65, 161, .35); transition: background .2s, box-shadow .2s; }
.votes-left:hover { background: var(--deep); }
.votes-left svg { width: 22px; height: 22px; color: #fff; }
.votes-left b { font-size: 22px; font-weight: 800; min-width: 14px; text-align: center; font-variant-numeric: tabular-nums; line-height: 1; }
.votes-left .lbl-left { font-size: 14px; font-weight: 700; opacity: .9; }
.votes-left.empty { background: var(--wait-soft); color: var(--ink-2); box-shadow: none; }
.votes-left.empty svg { color: var(--ink-3); }
.votes-left b.tick { animation: tick .5s; }
.votes-left .tip { position: absolute; bottom: calc(100% + 10px); right: 0; background: var(--deep); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; padding: 6px 10px; border-radius: 8px; opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity .15s, transform .15s; }
.votes-left .tip::after { content: ""; position: absolute; top: 100%; right: 22px; border: 6px solid transparent; border-top-color: var(--deep); }
.votes-left:hover .tip, .votes-left:focus-visible .tip, .votes-left.show-tip .tip { opacity: 1; transform: none; }
.votes-left.shake { animation: shake .45s; }
.aired-list, .missed-list { display: flex; flex-direction: column; gap: 14px; }

.story { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 22px 24px 14px; box-shadow: var(--shadow); display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 20px; position: relative; }
.slot { width: 52px; height: 52px; border-radius: 16px; background: var(--deep); color: #fff; font-weight: 800; font-size: 22px; display: grid; place-items: center; line-height: 1; }
.slot small { display: block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; margin-top: -10px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.story h3 { font-size: 21px; line-height: 1.35; letter-spacing: -0.012em; font-weight: 700; margin: 0 0 8px; }
.story .why { color: var(--ink-2); font-size: 15.5px; margin: 0 0 12px; }
.story .why b { color: var(--ink); font-weight: 600; }

.facts { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.votes { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.vote-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; border-radius: 999px; padding: 4px 10px 4px 7px; }
.vote-pill.yes { background: var(--green-soft); color: var(--green); }
.vote-pill.no { background: var(--wait-soft); color: var(--ink-2); }
.vote-pill svg { width: 14px; height: 14px; }

details.more { margin-top: 10px; }
details.more summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--accent-ink); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: "▾"; font-size: 12px; transition: transform .2s; }
details.more[open] summary::after { transform: rotate(180deg); }
.more-body { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 28px; padding: 16px 0 6px; }
.more-body h4 { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); margin: 0 0 8px; }
.reasons { display: grid; gap: 10px; grid-column: 1 / -1; }
.reason { font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
.reason b { color: var(--ink); }
.bars { display: grid; gap: 7px; font-size: 13.5px; }
.bar { display: grid; grid-template-columns: 110px 1fr 22px; align-items: center; gap: 10px; color: var(--ink-2); }
.bar i { height: 7px; border-radius: 4px; background: var(--line); position: relative; overflow: hidden; }
.bar i::after { content: ""; position: absolute; inset: 0; width: var(--w); background: var(--deep); border-radius: 4px; }
.bar b { color: var(--ink); text-align: right; }
.sources { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.sources a { font-weight: 600; text-decoration: none; }
.sources a:hover { text-decoration: underline; }
.sources .found { font-size: 12px; color: var(--ink-3); }
.also { margin: 12px 0 0; font-size: 14.5px; color: var(--ink-2); background: var(--bg); border-radius: 12px; padding: 10px 14px; }
.also b { color: var(--ink); font-weight: 600; }

/* comments */
.actions { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.cmt-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; cursor: pointer; font-weight: 600; font-size: 14.5px; color: var(--ink-2); padding: 7px 12px; margin-left: -12px; border-radius: 10px; }
.cmt-btn:hover, .cmt-btn[aria-expanded="true"] { background: var(--wait-soft); color: var(--ink); }
.cmt-btn svg { width: 20px; height: 20px; }
.thread { padding: 8px 0 8px; display: grid; gap: 10px; }
.cmt { display: flex; gap: 10px; align-items: flex-start; }
.cmt .bubble { background: var(--bg); border-radius: 4px 16px 16px 16px; padding: 9px 14px; font-size: 15px; line-height: 1.45; max-width: 640px; }
.cmt .who { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-3); margin-bottom: 1px; }
.cmt.mine .bubble { background: var(--soft); }
.cmt.mine .who { color: var(--deep); }
.anon { width: 30px; height: 30px; border-radius: 50%; background: var(--wait-soft); flex: none; display: grid; place-items: center; color: var(--ink-3); }
.anon svg { width: 16px; height: 16px; }
.write { display: flex; gap: 10px; align-items: flex-start; margin-top: 4px; }
.write textarea { flex: 1; resize: vertical; min-height: 44px; border: 1.5px solid var(--line-2); border-radius: 14px; padding: 10px 14px; font: inherit; font-size: 15px; background: #fff; }
.write textarea:focus { outline: none; border-color: var(--deep); }
.write .btn { padding: 10px 18px; font-size: 15px; }
.no-cmts { font-size: 14.5px; color: var(--ink-3); margin: 0; }

/* what didn't air */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.filter { border: 1.5px solid var(--line-2); background: #fff; border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 14px; cursor: pointer; color: var(--ink-2); }
.filter b { color: var(--ink-3); font-weight: 700; margin-left: 4px; }
.filter[aria-pressed="true"] { background: var(--soft); border-color: var(--soft); color: var(--deep); }
.filter[aria-pressed="true"] b { color: var(--brand); }
.live-note { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-3); margin: 0 12px 12px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

.story.missed { grid-template-columns: 76px minmax(0, 1fr); }
.upvote { width: 64px; border: 1.5px solid var(--line-2); background: #fff; border-radius: 16px; padding: 10px 0 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; align-self: start; transition: background .2s, border-color .2s, transform .15s; }
.upvote:hover { border-color: var(--brand); }
.upvote:active { transform: scale(.95); }
.upvote svg { width: 20px; height: 20px; color: var(--brand); transition: transform .2s; }
.upvote:hover svg { transform: translateY(-2px); }
.upvote .n { font-weight: 800; font-size: 18px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.upvote .lbl { font-size: 11px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.upvote[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.upvote[aria-pressed="true"] svg { color: #fff; }
.upvote[aria-pressed="true"] .lbl { color: rgba(255, 255, 255, .9); }
.upvote .n.tick { animation: tick .5s; }
@keyframes tick { 40% { transform: scale(1.35); } }
.story.voted { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow); }
.story.missed h3 { font-size: 19px; }
.why-not { font-size: 14.5px; color: var(--ink-2); margin: 0 0 4px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.limit-msg { grid-column: 1 / -1; background: var(--red-soft); color: #8E2A22; border-radius: 12px; padding: 10px 14px; font-size: 14.5px; font-weight: 600; margin-top: 8px; animation: drop .25s ease-out; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
.limit-msg button { border: 0; background: none; color: inherit; text-decoration: underline; font-weight: 700; cursor: pointer; padding: 0; }
.more-row { display: flex; justify-content: center; margin-top: 18px; }

@media (max-width: 760px) {
  .story { grid-template-columns: 1fr; padding: 18px 16px 10px; border-radius: 18px; }
  .story .slot { width: 40px; height: 40px; font-size: 18px; border-radius: 12px; position: absolute; top: 16px; right: 16px; }
  .slot small { display: none; }
  .story.aired .tags { padding-right: 48px; }
  .story h3 { font-size: 18.5px; }
  .story.missed { grid-template-columns: 58px minmax(0, 1fr); gap: 4px 12px; }
  .upvote { width: 56px; border-radius: 14px; }
  .upvote .lbl { font-size: 9px; letter-spacing: 0; }
  .more-body { grid-template-columns: 1fr; }
  .fold { border-radius: 20px; }
  .fold-head { padding: 20px 16px; gap: 12px; align-items: flex-start; }
  .fold-chev { width: 36px; height: 36px; }
  .fold-body { padding: 0 8px 10px; }
  .upvote-intro, .filter-row, .live-note { margin-left: 6px; margin-right: 6px; }
  .filter-row { align-items: flex-start; }
  .filter-row .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .filter { white-space: nowrap; }
  .bar { grid-template-columns: 96px 1fr 22px; }
}

/* ---- pictures that carry meaning ---- */
/* the episode menu (the site's own dropdown, never the browser's) */
.ep-anchor { position: relative; display: inline-block; }
.ep-select { display: inline-flex; align-items: center; gap: 12px; margin-top: 26px; }
.ep-label { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.ep-button { display: inline-flex; align-items: center; gap: 10px; font: inherit; font-weight: 700; font-size: 16px; color: #fff; background: var(--brand);
  border: 0; border-radius: 999px; padding: 11px 16px 11px 20px; cursor: pointer; box-shadow: 0 4px 14px rgba(109, 65, 161, .3); transition: background .2s; }
.ep-button:hover, .ep-button[aria-expanded="true"] { background: var(--deep); }
.ep-button svg { width: 18px; height: 18px; transition: transform .2s; }
.ep-button[aria-expanded="true"] svg { transform: rotate(180deg); }
.ep-menu { position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; min-width: 100%; max-height: 320px; overflow-y: auto;
  margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lift);
  animation: menu-in .16s ease-out; outline: none; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } }
.ep-menu li { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 14px; border-radius: 12px; cursor: pointer; }
.ep-menu li.active { background: var(--soft); }
.ep-opt-text { display: grid; line-height: 1.25; }
.ep-opt-text b { font-size: 15.5px; color: var(--ink); }
.ep-opt-text small { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.ep-check { width: 18px; height: 18px; color: var(--brand); visibility: hidden; flex: none; }
.ep-menu li[aria-selected="true"] .ep-check { visibility: visible; }
.ep-menu li[aria-selected="true"] b { color: var(--brand); }

/* the selection as a funnel: read → scored → aired */
.funnel-viz { width: 340px; display: grid; justify-items: center; gap: 6px; padding-bottom: 6px; }
.fv-band { height: 74px; display: grid; place-content: center; text-align: center; line-height: 1.1; }
.fv-band b { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.fv-band span { font-size: 13px; font-weight: 600; }
/* each band's bottom edge is as wide as the next band's top, so the three read as one funnel */
.fv-band.b1 { width: 100%; background: var(--soft); color: var(--deep); clip-path: polygon(0 0, 100% 0, 87% 100%, 13% 100%); }
.fv-band.b2 { width: 74%; background: #B79BDD; color: var(--deep); clip-path: polygon(0 0, 100% 0, 82.4% 100%, 17.6% 100%); }
.fv-band.b3 { width: 48%; background: var(--brand); color: #fff; clip-path: polygon(0 0, 100% 0, 72.9% 100%, 27.1% 100%); }
.fv-out { margin: 2px 0 6px; font-size: 13.5px; color: var(--ink-3); font-weight: 600; }
.voters { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); font-weight: 600; }
.voter { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; color: var(--ink); }
.voter i { width: 22px; height: 22px; border-radius: 50%; background: var(--deep); color: #fff; font-style: normal; font-weight: 800; font-size: 11px; display: grid; place-items: center; }

/* one picture per kind of story */
.k-business { --k: #A85F00; --kb: #FFF2DE; }
.k-culture  { --k: #B0306E; --kb: #FCE7F1; }
.k-release  { --k: #6D41A1; --kb: #F0EAF8; }
.k-policy   { --k: #3557A5; --kb: #E8EEF9; }
.k-safety   { --k: #1F7A8C; --kb: #E3F3F6; }
.k-research { --k: #4B45B8; --kb: #ECEBFB; }
.k-people   { --k: #B4532A; --kb: #FFEEE6; }
.k-oddity   { --k: #8A6D00; --kb: #FFF6D6; }
.k-other    { --k: #5D5770; --kb: #EFEDF4; }
.chip.kind { background: var(--kb); color: var(--k); gap: 5px; padding-left: 8px; }
.chip-ico { width: 14px; height: 14px; }
.story.aired { grid-template-columns: 64px minmax(0, 1fr) 112px; }
.story.aired .body { grid-column: 2; grid-row: 1; }
.kind-tile { grid-column: 3; grid-row: 1; align-self: start; width: 112px; height: 112px; border-radius: 20px; background: var(--kb); color: var(--k);
  display: grid; place-items: center; align-content: center; gap: 6px; font-size: 12.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.tile-ico { width: 44px; height: 44px; }
@media (max-width: 760px) {
  .story.aired { grid-template-columns: 1fr; }
  .story.aired .body { grid-column: 1; }
  .kind-tile { display: none; }
}
