/* Lists */
ul.article-list, ul.topic-feed, ul.source-list {
  list-style: square;
  padding-left: 1.25rem;
}
ul.article-list li, ul.source-list li { margin: 0.55rem 0; }
ul.article-list.compact li { margin: 0.3rem 0; }
ul.topic-feed { list-style: none; padding-left: 0; }
ul.topic-feed li {
  border-top: 1px solid light-dark(#ddd, #333);
  padding: 0.6rem 0;
}
ul.topic-feed li:first-child { border-top: none; }
ul.topic-feed h3 { font-size: 1.05rem; margin: 0 0 0.2rem; }
.topic-new-info { margin-top: 0.35rem; }
.topic-desc { color: light-dark(#444, #bcbcbc); font-style: italic; margin: 0.25rem 0 0.75rem; }

/* Articles & contributions */
article.source-article {
  border-bottom: 1px solid light-dark(#ddd, #333);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}
article.source-article h2 { margin-top: 0.25rem; }
article.source-article blockquote.snippet {
  border-left: 3px solid light-dark(#ddd, #333);
  margin: 0.5rem 0 0.5rem;
  padding: 0.25rem 0.75rem;
  color: light-dark(#444, #bcbcbc);
  font-style: italic;
}

/* YouTube-video articles: a static thumbnail with a play overlay, linking
   out to youtube.com. Deliberately not an iframe so the page stays free of
   YouTube tracker cookies. */
.video-thumb {
  margin: 0 0 0.5rem;
  max-width: 480px;
}
.video-thumb a {
  position: relative;
  display: block;
  line-height: 0;
}
.video-thumb img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  background: light-dark(#eee, #222);
}
.video-thumb .play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.5rem;
  line-height: 1;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 50%;
  width: 3.2rem;
  height: 3.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 0.35rem; /* optical centering of the triangle glyph */
  pointer-events: none;
}
.video-thumb a:hover .play-overlay { background: rgba(0, 0, 0, 0.75); }

section.contribution {
  border-top: 1px solid light-dark(#ddd, #333);
  padding: 0.75rem 0;
}
section.contribution.primary { border-top: none; padding-top: 0; }
section.contribution h3 { margin: 0 0 0.15rem; }
section.contribution .content { margin: 0.4rem 0; }

dl.per-topic { margin: 0.25rem 0 0.5rem; }
dl.per-topic dt {
  font-family: Helvetica, Arial, sans-serif;
  font-weight: bold;
  font-size: 0.95rem;
  margin-top: 0.5rem;
}
dl.per-topic dd { margin: 0.1rem 0 0 0; }
dl.per-topic dt a { color: inherit; text-decoration: none; }
dl.per-topic dt a:hover { text-decoration: underline; }

article .content img { max-width: 100%; height: auto; }
article .content pre {
  background: light-dark(#f4f4f4, #1a1a1a);
  border: 1px solid light-dark(#ccc, #444);
  padding: 0.5rem 0.75rem;
  overflow: auto;
}
article .content code, code {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.95em;
}
article .content blockquote {
  border-left: 3px solid light-dark(#999, #666);
  margin: 0.75rem 0;
  padding-left: 0.75rem;
  color: light-dark(#444, #bcbcbc);
}

/* Picks: per-article curator note under the article title. */
.pick-list .why {
  margin: 0.15rem 0 0;
  color: light-dark(#555, #aaa);
  font-size: 0.92rem;
}
.pick-random-notice {
  font-size: 0.9rem;
}

/* Digest slot picker: short stacked list of "Write the Week N digest" CTAs. */
.digest-slot-choices {
  list-style: none;
  padding-left: 0;
  margin: 0.75rem 0;
}
.digest-slot-choices li { margin: 0.4rem 0; }

/* /contribute hub: one card per contribution type. Auto-fit grid collapses to
   a single column on narrow viewports. */
.contribute-hub {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.75rem 1rem;
}
.contribute-hub li {
  margin: 0;
  padding: 0.7rem 0.9rem;
  border: 1px solid light-dark(#ddd, #333);
  border-radius: 6px;
  background: light-dark(#fafafa, #1a1a1a);
}
.contribute-hub li p { margin: 0.2rem 0; }

/* Visual step band on contribution flows: big numbered badges joined by wide
   arrows; stacks vertically (arrows rotate to point down) on narrow screens. */
.flow-steps {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.25rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}
.flow-step { display: flex; align-items: center; gap: 0.6rem; }
.flow-step .step-num {
  flex: none;
  width: 2.4rem; height: 2.4rem;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 1.3rem; font-weight: 700;
  background: light-dark(#1f1f1f, #d4d4d4);
  color: light-dark(#fafafa, #111);
}
.flow-step .step-label { font-size: 1rem; }
.step-arrow {
  font-size: 1.8rem; line-height: 1;
  color: light-dark(#888, #777);
  padding: 0 0.15rem;
}
@media (max-width: 560px) {
  .flow-steps { flex-direction: column; align-items: stretch; }
  .flow-step { justify-content: flex-start; }
  .step-arrow { align-self: center; transform: rotate(90deg); }
}

.role-note { margin: 0.75rem 0; }

/* Streamlined mobile share-back: a visual sub-flow with smaller badges than the
   primary .flow-steps band so it reads as a hint, not a second main flow. */
.share-flow {
  margin: 1.25rem 0 0.5rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid light-dark(#e3e3e3, #2c2c2c);
  border-radius: 6px;
  background: light-dark(#fafafa, #161616);
}
.share-flow-lead { margin: 0 0 0.5rem; }
.share-flow-steps { margin: 0.4rem 0 0.6rem; gap: 0.35rem 0.5rem; }
.share-flow-steps .step-num {
  width: 1.7rem; height: 1.7rem;
  font-size: 0.95rem;
}
.share-flow-steps .step-label { font-size: 0.9rem; }
.share-flow-steps .step-arrow { font-size: 1.3rem; }
/* Prominent install button inside the share-back card, with a manual fallback
   note tucked under the share steps. The note shows only the instruction that
   matches the reader's OS (classes set by the head bootstrap); the generic line
   covers anything we couldn't pin to iOS or Android. */
.install-prereq { margin: 0.7rem 0 0; padding: 0.6rem 0 0; border-top: 1px solid light-dark(#ececec, #262626); }
.install-prereq-lead { margin: 0 0 0.4rem; color: light-dark(#555, #aaa); }
.share-flow .app-install { margin: 0.25rem 0 0.5rem; }
.install-manual { margin: 0.4rem 0 0; }
.install-ios, .install-android { display: none; }
html.is-ios .install-ios { display: inline; }
html.is-android .install-android { display: inline; }
html.is-ios .install-generic,
html.is-android .install-generic { display: none; }

/* Installing is only a prerequisite for the share-back habit, and only for
   readers who don't have the app. Drop the whole prerequisite block (button +
   instructions) once we're already running as the installed app — the lead +
   steps above, which are the actual advice, stay. */
html.is-installed .install-prereq { display: none; }

/* Progressive reveal: keep the submit block hidden until the CTA reveals it.
   Gated on .js so no-JS readers always see the form. */
html.js .contribute-submit[data-collapsed]:not(.revealed) { display: none; }
/* The paste form shows on every device once revealed; the "next time, skip the
   copy-paste" share-back hint is phone-only (share sheet / Add to Home Screen
   framing doesn't apply on desktop). */
.submit-phone { display: none; }
html.is-phone .submit-phone { display: block; }

/* "Install the app" button on contribute flows. Stays hidden (the `hidden`
   attribute) until JS sees the browser's beforeinstallprompt and unhides it;
   clicking triggers the native install dialog. .actions supplies the button
   styling; the trailing note sits inline next to it. */
.app-install { margin: 0.75rem 0; }
.app-install small { margin-left: 0.5rem; }

/* Home-page digest grid: weekly + monthly side-by-side as compact cards,
   stacks on narrow screens. */
.digest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1.25rem;
  margin: 1rem 0 0.25rem;
}
@media (max-width: 620px) {
  .digest-grid { grid-template-columns: 1fr; }
}
.digest-compact {
  margin: 0;
  padding: 0.6rem 0.85rem;
  border: 1px solid light-dark(#ddd, #333);
  border-radius: 6px;
  background: light-dark(#fafafa, #1a1a1a);
}
.digest-compact h3 {
  margin: 0 0 0.15rem;
  font-size: 1.05rem;
}
.digest-compact h3 a {
  text-decoration: none;
  color: inherit;
}
.digest-compact h3 a:hover { text-decoration: underline; }
.digest-compact .meta,
.digest-compact .digest-empty-line {
  margin: 0;
  color: light-dark(#555, #aaa);
}
.digest-empty.digest-compact {
  background: light-dark(#fff8e6, #2a2410);
  border-color: light-dark(#e6d28a, #4a3e1a);
}
