/* The issue page: text, chips, votes, citations, selection, contents rail, selection bar. */

/* --- the issue ------------------------------------------------------------------ */

.issue { font: 400 1.125rem/1.62 var(--serif); overflow-wrap: anywhere;
         font-optical-sizing: auto; }
.issue [id] { scroll-margin-top: calc(var(--bar-h) + 16px); }
.dateline { font: 500 .85rem/1.3 var(--sans); color: var(--ink-2); margin: 6px 0 12px;
            display: flex; align-items: center; gap: 10px; }
.dateline-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-3); }
.issue h1 { font: 620 1.7rem/1.2 var(--serif); letter-spacing: -.014em; margin: 0 0 20px;
            text-wrap: balance; }
.hint { font: .82rem/1.4 var(--sans); color: var(--ink-3); margin: -8px 0 20px; }
.hint[hidden] { display: none; }
.issue p, .issue li, .issue blockquote { margin: 0 0 1em; }
.issue ul, .issue ol { padding-left: 1.25em; margin: 0 0 1.1em; }
.issue li::marker { color: var(--ink-3); }
.issue blockquote { padding-left: 16px; border-left: 2px solid var(--rule); color: var(--ink-2);
                    font-style: italic; }
.issue strong { font-weight: 650; }
.issue p.today strong:first-child { font: 650 .78em/1 var(--sans); color: var(--hl-ink);
                                    letter-spacing: .01em; margin-right: .2em; }
.issue p.intake { line-height: 1.45; margin-bottom: 1.6em; }
.issue p.intake em { font: normal .85rem/1.45 var(--sans); color: var(--ink-3); }

/* jump chips: one scrolling row on phones */
nav.jump { display: flex; gap: 8px; margin: 0 calc(-1 * var(--gutter)) 24px;
           padding: 2px var(--gutter) 6px; overflow-x: auto; scrollbar-width: none;
           -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
           mask-image: linear-gradient(90deg, #000 88%, transparent); }
nav.jump::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
  border-radius: 20px; background: var(--raised); color: var(--ink);
  text-decoration: none; font: 500 .86rem/1.1 var(--sans); white-space: nowrap;
}
.chip:active { background: var(--hl-tint); }

/* sections: the title gets a highlighter stroke through its lower half */
.issue section[data-section] { margin-top: 3.4rem; }
.issue h2 { font: 700 1.32rem/1.25 var(--sans); letter-spacing: -.015em; margin: 0 0 1rem; }
.issue section[data-section] > h2, .issue .sec-head h2, .issue #sources > h2 {
  width: fit-content; padding: 0 .12em; margin-left: -.12em;
  background: linear-gradient(transparent 58%, var(--hl-tint) 58%, var(--hl-tint) 92%, transparent 92%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.sec-head { display: flex; align-items: center; gap: 8px; margin-bottom: 1rem; }
.sec-head h2 { flex: 0 1 auto; min-width: 0; margin: 0; }
.sec-head .fb { margin-left: auto; }
.issue h3 { font: 640 1.28rem/1.3 var(--serif); letter-spacing: -.01em; margin: 2.6rem 0 .35rem;
            text-wrap: balance; }
.issue section > h2 + h3, .sec-head + h3 { margin-top: .4rem; }
.story-meta { font: 500 .8rem/1.3 var(--sans) !important; color: var(--ink-3); margin: 0 0 1.1rem !important; }

/* votes: the thumb is the button */
.fb { display: flex; gap: 0; flex: none; }
.fb-btn {
  width: var(--tap); height: var(--tap); padding: 0; border: 0; background: none;
  cursor: pointer; font-size: 1.32rem; line-height: 1; border-radius: 12px;
  filter: grayscale(1); opacity: .5; transition: opacity .15s, filter .15s;
  -webkit-tap-highlight-color: transparent;
}
.fb-btn:hover { opacity: .8; }
.fb-btn[aria-pressed="true"] { filter: none; opacity: 1; }
.fb:has([aria-pressed="true"]) .fb-btn[aria-pressed="false"] { opacity: .3; }
.fb-btn.pop { animation: fb-pop .24s ease-out; }
@keyframes fb-pop { 45% { transform: scale(1.3) rotate(-8deg); } }
.fb-btn.pending { opacity: .65; filter: grayscale(.4); }
.story-fb { display: flex; align-items: center; justify-content: flex-end; gap: 4px;
            margin: -.3rem 0 0; font: 500 .8rem/1.2 var(--sans); color: var(--ink-3); }
.story-fb-label { white-space: nowrap; margin-right: 2px; }
/* why a 👎: quiet chips under the vote */
.why { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px;
       margin: 2px 0 0; font: 500 .8rem/1.2 var(--sans); color: var(--ink-3); }
.why-q { margin-right: 2px; }
.why-chip { min-height: 36px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 18px;
            background: none; color: var(--ink-2); font: 500 .8rem/1 var(--sans); cursor: pointer; }
.why-chip:hover, .why-chip:focus-visible { border-color: var(--hl); color: var(--ink); }
.why-done { color: var(--ink-3); }
.why-change { min-height: 36px; padding: 0 6px; border: 0; background: none; color: var(--hl-ink);
              font: 600 .8rem/1 var(--sans); cursor: pointer; }
.why-other { display: flex; gap: 6px; width: 100%; max-width: 420px; }
.why-other input { flex: 1; min-width: 0; min-height: 36px; padding: 0 12px; border-radius: 18px;
                   border: 1px solid var(--rule); background: var(--surface); color: var(--ink);
                   font: 500 .85rem/1 var(--sans); }
.why-other input:focus { outline: none; border-color: var(--hl); }

/* citations: a small chip naming the source; the tap target is taller than the chip */
a.cite {
  position: relative; display: inline-block; font: 600 .66em/1.5 var(--sans);
  padding: 0 .5em; margin: 0 .1em; border-radius: 5px; vertical-align: .14em;
  background: var(--raised); color: var(--ink-2); text-decoration: none; white-space: nowrap;
}
a.cite::after { content: ""; position: absolute; inset: -12px -3px; }
a.cite:hover, a.cite:focus-visible { color: var(--ink); background: var(--hl-tint); }

/* tap-to-select: the highlighter */
.issue .selectable { position: relative; cursor: pointer; border-radius: 3px;
                     transition: background-color .12s, box-shadow .12s; }
.issue .selectable:active { background: color-mix(in srgb, var(--hl-tint) 60%, transparent); }
.issue .sel { background: var(--hl-tint); box-shadow: -8px 0 0 var(--hl-tint), 8px 0 0 var(--hl-tint); }
.issue .sel::before, .issue .saved::before {
  content: ""; position: absolute; left: -14px; top: .25em; bottom: .25em; width: 3px;
  border-radius: 2px; background: var(--hl);
}
.issue .saved:not(.sel)::before { opacity: .7; }
.issue li.sel::marker { color: var(--hl-ink); }
body.has-selbar .wrap { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }

/* reference lists: sources + web sources */
.issue section.reflist { font: .9rem/1.5 var(--sans); color: var(--ink-2); }
.issue section.reflist h2 { color: var(--ink); }
.issue section.reflist ul { list-style: none; padding: 0; }
.issue section.reflist li { padding: 8px 0; border-bottom: 1px solid var(--rule); margin: 0; }
.issue section.reflist li a { text-decoration: none; color: var(--ink); }
.issue #sources { margin-top: 3.4rem; font: .9rem/1.5 var(--sans); color: var(--ink-2); }
.issue ol.sources { padding-left: 0; list-style: none; }
.issue ol.sources > li { padding: 10px 0; margin: 0; border-bottom: 1px solid var(--rule); }
.issue .src-id { font: 600 .78rem/1 var(--sans); color: var(--ink-3); }
.issue ol.sources > li > a { color: var(--ink); font-weight: 600; text-decoration: none; }
.issue ul.src-via { list-style: none; padding-left: 0; margin: 4px 0 0; font-size: .82rem; }
.issue ul.src-via li { margin: 2px 0; }
.issue ul.src-via a { color: var(--ink-3); text-decoration: none; }
.issue li:target { background: var(--hl-tint); box-shadow: -8px 0 0 var(--hl-tint), 8px 0 0 var(--hl-tint); }

/* desktop contents rail */
.issue-layout { display: block; }
.rail { display: none; }
.rail-date { display: flex; align-items: flex-end; gap: 10px; font-size: 3.4rem; margin: 6px 0 24px; }
.rail-date .dm-side { padding-bottom: 4px; font-size: .82rem; }
.rail-toc { display: flex; flex-direction: column; }
.rail-toc a { position: relative; padding: 8px 0 8px 14px; color: var(--ink-3); text-decoration: none;
              font: 500 .86rem/1.35 var(--sans); }
.rail-toc a::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px;
                      border-radius: 1px; background: var(--rule); }
.rail-toc a:hover { color: var(--ink); }
.rail-toc a.on { color: var(--ink); font-weight: 600; }
.rail-toc a.on::before { background: var(--hl); width: 3px; }

/* selection pill */
.selbar {
  position: fixed; z-index: 30; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translate(-50%, 0); transition: transform .2s ease-out, opacity .2s;
  max-width: calc(100vw - 32px);
}
.selbar[hidden] { display: block; transform: translate(-50%, 160%); opacity: 0; visibility: hidden;
                  transition: transform .18s ease-in, opacity .18s, visibility 0s .18s; }
.selbar-inner { display: flex; align-items: center; gap: 4px; padding: 4px 4px 4px 6px;
                border-radius: 28px; background: var(--hl); color: var(--on-hl); box-shadow: var(--shadow); }
.sel-count { display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 6px;
             border-radius: 16px; background: var(--on-hl); color: var(--hl);
             font: 700 .92rem/1 var(--sans); font-variant-numeric: tabular-nums; }
.sel-save { min-height: var(--tap); padding: 0 14px; border: 0; background: none; color: inherit;
            font: 650 .98rem/1 var(--sans); cursor: pointer; white-space: nowrap; }
.sel-save[disabled] { opacity: .6; }
.sel-clear { display: grid; place-items: center; width: 40px; height: 40px; border: 0;
             border-radius: 50%; background: rgb(0 0 0 / .1); color: inherit; cursor: pointer; }
