/* ==================================================================
   /tools/youtube-rss-feed-generator on the foundation look.
   Loaded ONLY when the 'tools-rss-feed-generator-fnd' redesign switch
   is on for this viewer; the old page keeps its own three stylesheets.

   Layout unique to this page only. The first screen, the guide, the
   questions, the links and the close are the shared tool kit
   (foundation-tools.css); the input, text box, badges, segment, rows,
   tables and the picture box are the foundation's and are NOT redrawn
   here.

   Same shape as the Playlist Length Calculator: one centred column at
   every width. Paste a link, then the answer right under the bar.
   ================================================================== */

/* ------------------------------------------------------------------
   1. THE FIRST SCREEN
   ------------------------------------------------------------------ */
@media (min-width: 1024px) {
  .rs3-top .fnd-tool-top__in { display: block; }
  /* The answer here is a plain card, never pinned. Relative, never
     static, so nothing layered inside it escapes the card. */
  .fnd .rs3 .rs3-out { position: relative; top: auto; }
}
.fnd .rs3 .fnd-tool-lead,
.fnd .rs3 .rs3-ask,
.fnd .rs3 .rs3-out { max-width: 760px; margin-left: auto; margin-right: auto; }
/* A wider name and line on a computer, so each takes one line. After
   the 760 above, or it loses. */
@media (min-width: 1024px) {
  .fnd .rs3 .fnd-tool-lead { max-width: 960px; }
  .fnd .rs3 .fnd-tool-lead .fnd-display { max-width: none; }
}

/* The name and its line, centred over the bar they introduce. */
.fnd .rs3 .fnd-tool-lead { text-align: center; }
.fnd .rs3 .fnd-tool-lead .fnd-display,
.fnd .rs3 .fnd-tool-lead__sub { margin-left: auto; margin-right: auto; text-align: center; }
.fnd .rs3 .fnd-tool-lead__sub { text-wrap: balance; }
.fnd .rs3 h1.fnd-display,
.fnd .rs3-qa__list summary,
.fnd.rs3-page .fnd-tool-close .fnd-btn { text-wrap: balance; }
/* Video titles from YouTube, the answers and the tool cards: no word left
   alone on a last line. */
.fnd .rs3 .fnd-row-t,
.fnd .rs3-qa__body p,
.fnd.rs3-page .fnd-tool-links p { text-wrap: pretty; }
@media (max-width: 413px) {
  .fnd .rs3 .fnd-tool-lead .fnd-display { font-size: 2.15rem; }
}
@media (max-width: 559px) {
  .fnd .rs3 .fnd-tool-lead { margin-bottom: var(--fnd-s4); }
}

/* The bar sits bare on the page like a search box: no card around it. */
.fnd .rs3 .rs3-ask { background: none; border: 0; border-radius: 0; box-shadow: none; }
.fnd .rs3 .rs3-ask > .fnd-card-body { padding: 0; }
.rs3-ask,
.rs3-out { scroll-margin-top: calc(var(--header-height, 61px) + 16px); }

/* The search bar, the same as the Playlist Length Calculator's bar
   (copied, not shared, so no page can move another). */
.fnd .rs3-bar {
  display: flex; align-items: center; gap: var(--fnd-s2);
  background: var(--fnd-card);
  border: 1px solid var(--fnd-edge);
  border-radius: 999px;
  padding: 5px 5px 5px 20px;
  box-shadow: 0 1px 2px rgba(23, 20, 31, .05), 0 12px 28px -16px rgba(23, 20, 31, .3);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.fnd .rs3-bar:focus-within {
  border-color: var(--fnd-text);
  box-shadow: 0 0 0 3px var(--fnd-accent-soft), 0 12px 28px -16px rgba(23, 20, 31, .3);
}
.rs3-bar > .rs3-mark { flex: 0 0 auto; font-size: 15px; color: var(--fnd-text-faint); }
.fnd .rs3 .rs3-bar .fnd-input {
  flex: 1 1 auto; width: auto; min-width: 0;
  padding: 0 var(--fnd-s1);
  background: transparent; border: 0; border-radius: 0;
}
.fnd .rs3 .rs3-bar .fnd-input:focus { box-shadow: none; }
.fnd .rs3-bar .fnd-btn { flex: 0 0 auto; border-radius: 999px; white-space: nowrap; }
.fnd .rs3-bar:has(.fnd-btn:focus-visible) {
  border-color: var(--fnd-edge);
  box-shadow: 0 1px 2px rgba(23, 20, 31, .05), 0 12px 28px -16px rgba(23, 20, 31, .3);
}
.fnd .rs3 .fnd-btn[aria-busy="true"] { cursor: progress; opacity: .8; }
/* Phones: a narrower button and a 16px box (the size below which an
   iPhone zooms in on a box), so the hint shows whole. */
@media (max-width: 559px) {
  .fnd .rs3-bar { padding-left: 16px; }
  .fnd .rs3-bar .fnd-btn { padding: 0 var(--fnd-s2); }
  .fnd .rs3 .rs3-bar .fnd-input { padding: 0 2px; font-size: 16px; }
}
/* The smallest phones drop the search mark so the hint still fits. */
@media (max-width: 399px) {
  .fnd .rs3-bar { padding-left: 14px; }
  .rs3-bar > .rs3-mark { display: none; }
}
.fnd .rs3 .rs3-ask .fnd-error,
.fnd .rs3 .rs3-ask .rs3-wait { text-align: center; text-wrap: pretty; }
.fnd .rs3 .rs3-ask .rs3-wait { margin-top: var(--fnd-s2); }

/* Many at once: the shared text box, then the count and the button on
   one line. */
.fnd .rs3 .rs3-many .fnd-label { display: block; margin-bottom: var(--fnd-s1); }
.fnd .rs3 .rs3-list { width: 100%; font-size: 16px; line-height: 1.6; }
.rs3-many__row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--fnd-s2) var(--fnd-s3); margin-top: var(--fnd-s2);
}
.fnd .rs3 .rs3-count { display: inline; margin: 0; text-align: left; }
@media (max-width: 559px) {
  .fnd .rs3 .rs3-many__row .fnd-btn { flex: 1 1 100%; justify-content: center; }
  .fnd .rs3 .rs3-count { flex: 1 1 100%; }
}

/* "Try:" and the examples, then "Add to:" and the readers. The dot sits
   in the gap; a part that starts a line has its dot outside the box,
   where it is clipped. None after the key. A wrapped line sits 24px down,
   so each link's 44px press stays off the line above. */
.fnd .rs3 .rs3-try,
.fnd .rs3 .rs3-readers {
  margin: var(--fnd-s1) 0 0;
  column-gap: 21px; row-gap: 24px; overflow: hidden;
  color: var(--fnd-text-soft); font-size: var(--fnd-t-meta);
}
.fnd .rs3 .rs3-try { justify-content: center; }
/* A wrapped line starts at the edge, where its dot is clipped; centred, it would show. */
.fnd .rs3 .rs3-readers { justify-content: flex-start; }
@media (max-width: 559px) {
  .fnd .rs3 .rs3-try { justify-content: flex-start; }
}
.fnd .rs3 .rs3-try > span,
.fnd .rs3 .rs3-readers > span { position: relative; display: inline-flex; align-items: center; }
.fnd .rs3 .rs3-try span + span::before,
.fnd .rs3 .rs3-readers span + span::before {
  content: "\00b7"; position: absolute; top: 50%; left: -21px; width: 21px;
  margin: 0; transform: translateY(-50%); text-align: center; opacity: .6;
}
.fnd .rs3 .rs3-try__k + span::before { content: none; }
.fnd .rs3 .rs3-try__k { margin-right: -13px; }
/* The switch between one and many, centred under the examples. */
.fnd .rs3 .rs3-mode { margin: var(--fnd-s2) 0 0; text-align: center; }
@media (max-width: 559px) {
  .fnd .rs3 .rs3-mode { text-align: left; }
}

/* ------------------------------------------------------------------
   2. THE ANSWER: the channel, the kind of feed, the feed link, the
   readers, the newest uploads, then the other ways to use it.
   ------------------------------------------------------------------ */
.fnd .rs3 .rs3-out { margin-top: var(--fnd-s5); transition: opacity 160ms ease; }
/* While it looks, everything fades and waits except Start over, which
   stays live so they can cancel. */
.fnd .rs3 .rs3-single > :not(.rs3-acts),
.fnd .rs3 .rs3-exnote { transition: opacity 160ms ease; }
.fnd .rs3 .rs3-out--busy .rs3-single > :not(.rs3-acts),
.fnd .rs3 .rs3-out--busy .rs3-exnote,
.fnd .rs3 .rs3-out--busy .rs3-single .rs3-acts > .rs3-copylink,
.fnd .rs3 .rs3-out--busy .rs3-single .rs3-acts__more > :not(.rs3-reset) { opacity: .45; pointer-events: none; }
.rs3-out.rs3-out--in { animation: rs3-in 320ms cubic-bezier(.22, 1, .36, 1); }
@keyframes rs3-in { from { opacity: .4; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .rs3-out.rs3-out--in { animation: none; }
  .fnd .rs3 .rs3-out,
  .fnd .rs3 .rs3-single > :not(.rs3-acts),
  .fnd .rs3 .rs3-exnote { transition: none; }
}
/* The card body spaces every child after the first, and the hidden
   example note still counts as one, so the answer would sit low. */
.fnd .rs3 .rs3-out .rs3-single,
.fnd .rs3 .rs3-out .rs3-bulk { margin-top: 0; }

/* The example: a badge saying so, and no buttons, readers or extras, so
   "Get feed" stays the one main button until the answer is theirs. */
.fnd .rs3-exnote {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 4px var(--fnd-s2);
  margin: 0 0 var(--fnd-s4);
  font-size: var(--fnd-t-meta); line-height: 1.5; color: var(--fnd-text-soft);
}
.fnd .rs3-exnote > span:last-child { text-wrap: pretty; }
.fnd .rs3 .rs3-out:not(.rs3-out--example) .rs3-exnote,
.fnd .rs3 .rs3-out--example .rs3-acts,
.fnd .rs3 .rs3-out--example .rs3-readers,
.fnd .rs3 .rs3-out--example .rs3-more { display: none; }

/* The channel's name and its ID. */
.fnd .rs3 .rs3-head { margin: 0; }
.fnd .rs3-head__title {
  margin: 0; min-width: 0;
  font-family: var(--fnd-display-font); font-weight: 700;
  font-size: var(--fnd-t-h3-lg); line-height: 1.3; color: var(--fnd-text);
  overflow-wrap: anywhere; text-wrap: balance;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.rs3-head__title:focus { outline: none; }
.fnd .rs3-head__meta {
  display: flex; flex-wrap: wrap; align-items: center; column-gap: 21px; row-gap: 0; overflow: hidden;
  margin: 2px 0 0; font-size: var(--fnd-t-meta); color: var(--fnd-text-soft);
}
.fnd .rs3-head__meta > span { position: relative; min-width: 0; overflow-wrap: anywhere; }
/* The ID moves as one piece: after its label, or whole on the next line. */
.fnd .rs3-head__meta .rs3-idv { display: inline-block; max-width: 100%; }
.fnd .rs3-head__meta > span + span::before {
  content: "\00b7"; position: absolute; top: 50%; left: -21px; width: 21px;
  transform: translateY(-50%); text-align: center; opacity: .6;
}
@media (max-width: 559px) {
  .fnd .rs3 .rs3-head .rs3-head__title { font-size: var(--fnd-t-h3); }
}
/* The narrowest phones: a channel ID stays on one line, never one letter alone. */
@media (max-width: 359px) {
  .fnd .rs3-head__meta { font-size: var(--fnd-t-micro); }
}

/* The kind of feed: its label, then the shared segment. */
.fnd .rs3 .rs3-typerow {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--fnd-s2) var(--fnd-s3); margin-top: var(--fnd-s4);
}
.fnd .rs3 .rs3-typerow__k { font-size: var(--fnd-t-meta); font-weight: 600; color: var(--fnd-text-soft); }
.fnd .rs3 .rs3-type-help { margin: var(--fnd-s1) 0 0; text-wrap: pretty; }
/* On a phone the four share one row, equal width. */
@media (max-width: 559px) {
  .fnd .rs3 .rs3-typerow { display: block; }
  .fnd .rs3 .rs3-typerow__k { display: block; margin-bottom: var(--fnd-s2); }
  .fnd .rs3 .rs3-type { display: flex; width: 100%; }
  .fnd .rs3 .rs3-type button { flex: 1 1 0; min-width: 0; padding: 0 var(--fnd-s1); }
}
/* The narrowest phones: a step smaller, so "Videos" never touches "Shorts". */
@media (max-width: 359px) {
  .fnd .rs3 .rs3-type button { font-size: var(--fnd-t-micro); }
}

/* The feed link on its soft panel, set like the embed page's code. */
.fnd .rs3 .rs3-feed-k { margin: var(--fnd-s4) 0 0; font-size: var(--fnd-t-meta); font-weight: 600; color: var(--fnd-text-soft); }
.fnd .rs3-code {
  margin: var(--fnd-s2) 0 0;
  padding: var(--fnd-s3);
  background: var(--fnd-paper-2); border-radius: var(--fnd-r-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--fnd-t-sm); line-height: 1.6; color: var(--fnd-text);
  white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal;
}

/* Copy feed link first, the quiet buttons beside it. On a phone the main
   one takes the whole width and the rest wrap under it. */
.fnd .rs3 .rs3-acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--fnd-s2) var(--fnd-s4); margin-top: var(--fnd-s3); }
.rs3-acts__more { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--fnd-s4); }
.fnd .rs3 .rs3-copylink[data-copied="true"] { background: var(--fnd-ok); border-color: var(--fnd-ok); }
.fnd .rs3 .fnd-btn:disabled { cursor: not-allowed; opacity: .55; }
@media (max-width: 559px) {
  .fnd .rs3 .rs3-acts > .fnd-btn { flex: 1 1 100%; justify-content: center; }
  .rs3-acts__more { width: 100%; justify-content: space-between; gap: 28px var(--fnd-s4); }
}
/* Text buttons grown to a 44px tap, in the accent so they read as things
   to press. */
.fnd .rs3 .rs3-link.fnd-textbtn { --fnd-hit-y: 14px; font-size: var(--fnd-t-meta); color: var(--fnd-accent-deep); white-space: nowrap; }
.fnd .rs3 a.rs3-link { text-decoration: none; }
.fnd .rs3 .rs3-link.fnd-textbtn:hover { color: var(--fnd-text); }
.fnd .rs3 .rs3-link i { margin-right: 4px; }
.fnd .rs3 .rs3-link[data-copied="true"] { color: var(--fnd-ok); }
.fnd .rs3 .rs3-link:disabled { cursor: not-allowed; opacity: .55; }

/* The readers line sits under the buttons, left as they are. */
.fnd .rs3 .rs3-readers { margin-top: var(--fnd-s2); }

/* A band inside the answer, so its heading is a step smaller than the
   channel's. */
.fnd .rs3 .rs3-box { margin-top: var(--fnd-s5); }
.fnd .rs3 .rs3-box .fnd-tool-h3 { margin: 0; font-size: var(--fnd-t-h3); }
.fnd .rs3 .rs3-box .fnd-help { margin: 4px 0 var(--fnd-s3); text-wrap: pretty; }

/* More ways to use it: four quiet buttons that wrap as they fit. */
.fnd .rs3 .rs3-more__btns {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0 var(--fnd-s4); margin: var(--fnd-s1) 0 0;
}
.fnd .rs3 .rs3-check-out { margin: var(--fnd-s2) 0 0; overflow-wrap: anywhere; }
.fnd .rs3 .rs3-check-out[data-ok="true"] { color: var(--fnd-ok); }
.fnd .rs3 .rs3-check-out[data-ok="false"] { color: var(--fnd-danger); }
/* Phones: one per line, so no label ever wraps. The 28px gap keeps each
   44px press clear of the next one. */
@media (max-width: 559px) {
  .fnd .rs3 .rs3-more__btns { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; gap: 28px 0; margin-top: var(--fnd-s3); }
  .fnd .rs3 .rs3-more__btns .rs3-link { justify-content: flex-start; text-align: left; }
}

/* Rows: the shared list row, the picture, the title and its date. */
.fnd .rs3 .rs3-rows { margin-top: var(--fnd-s3); }
.fnd .rs3 .rs3-latest-box .rs3-rows .fnd-row { grid-template-columns: 104px minmax(0, 1fr); }
@media (max-width: 559px) {
  .fnd .rs3 .rs3-latest-box .rs3-rows .fnd-row { grid-template-columns: 84px minmax(0, 1fr); }
}
/* The narrowest phones get a third line, so a title is more than a few words. */
@media (max-width: 399px) {
  .fnd .rs3 .rs3-rows .fnd-row-t { -webkit-line-clamp: 3; }
}
.fnd .rs3 .rs3-rows .fnd-row-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Whole words wrap; only a word wider than the row is broken. */
.fnd .rs3 .rs3-rows .fnd-row-t,
.fnd .rs3 .rs3-rows .fnd-row-meta > span { min-width: 0; overflow-wrap: break-word; word-break: normal; }
/* Each newest upload is one link, so the press is the whole row (picture and
   title), never a single 20px line of text. Only the title takes the hover. */
.fnd .rs3 a.rs3-vrow,
.fnd .rs3 a.rs3-vrow:hover { color: var(--fnd-text); text-decoration: none; }
.fnd .rs3 a.rs3-vrow .fnd-row-t { transition: color 140ms ease; }
.fnd .rs3 a.rs3-vrow:hover .fnd-row-t { color: var(--fnd-accent-deep); }
.fnd .rs3 a.rs3-vrow:focus-visible { outline: 2px solid var(--fnd-accent-deep); outline-offset: 2px; }
.fnd .rs3 .rs3-rows .fnd-row-meta { gap: 2px 0; column-gap: 21px; overflow: hidden; }
.fnd .rs3 .rs3-rows .fnd-row-meta > span { position: relative; }
.fnd .rs3 .rs3-rows .fnd-row-meta > span + span::before {
  content: "\00b7"; position: absolute; top: 0; left: -21px; width: 21px; text-align: center; opacity: .6;
}

/* Many at once: one row per line, the feed link under the name, its copy
   button at the end (under the text on a phone, as the shared row does). */
.fnd .rs3 .rs3-acts--bulk { margin-top: var(--fnd-s3); }
.fnd .rs3 .rs3-bulk-help { margin: var(--fnd-s2) 0 0; text-wrap: pretty; }
.fnd .rs3 .rs3-bulk-rows .fnd-row { grid-template-columns: minmax(0, 1fr) auto; }
.fnd .rs3 .rs3-bulk-rows .fnd-row-end { grid-column: 2; grid-row: auto; }
.fnd .rs3 .rs3-bulk-rows .fnd-row-end:empty { display: none; }
@media (max-width: 559px) {
  .fnd .rs3 .rs3-bulk-rows .fnd-row { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .fnd .rs3 .rs3-bulk-rows .fnd-row-end { grid-column: 1; grid-row: 2; margin-top: var(--fnd-s1); }
}
.fnd .rs3 .rs3-bulk-rows .fnd-row[data-state="wait"] .fnd-row-main { opacity: .55; }
.fnd .rs3 .rs3-bulk-rows .fnd-row[data-state="fail"] .fnd-row-meta { color: var(--fnd-danger); }
.fnd .rs3 .rs3-mono {
  display: block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; overflow-wrap: anywhere; word-break: normal;
}

/* The next step: under the answer, once it is theirs. */
.fnd .rs3 .rs3-next {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--fnd-s3) var(--fnd-s4);
  margin-top: var(--fnd-s5); padding-top: var(--fnd-s4);
  border-top: 1px solid var(--fnd-rule);
}
.rs3-next__t { flex: 1 1 300px; min-width: 0; }
.fnd .rs3 .rs3-next .fnd-tool-h3 { margin: 0; font-size: var(--fnd-t-h3); text-wrap: balance; }
.fnd .rs3 .rs3-next__t .fnd-help { margin: 4px 0 0; text-wrap: pretty; }
.rs3-next__go { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.fnd .rs3 .rs3-next__hint { margin: 0; }
@media (max-width: 559px) {
  .rs3-next__go { flex: 1 1 100%; }
  .fnd .rs3 .rs3-next__go .fnd-btn { width: 100%; justify-content: center; }
}

/* ------------------------------------------------------------------
   3. THE GUIDE
   ------------------------------------------------------------------ */
.fnd .rs3-guide .fnd-tool-read .fnd-h2 {
  margin-top: var(--fnd-s8);
  max-width: 24ch;
  scroll-margin-top: calc(var(--header-height, 61px) + var(--fnd-s4));
}
.rs3-guide .fnd-tool-read .fnd-h2:focus { outline: none; }
.fnd .rs3-guide .fnd-toc li > a:not(.fnd-btn) { text-wrap: pretty; }
@media (max-width: 767px) {
  .fnd .rs3-guide .fnd-tool-read .fnd-h2 { margin-top: var(--fnd-s7); }
}
/* A link inside a sentence grows to a 44px press without moving the text. */
.fnd .rs3-guide .fnd-tool-read p a:not(.fnd-btn),
.fnd .rs3-guide .fnd-tool-read li a:not(.fnd-btn),
.fnd .rs3-qa__list p a:not(.fnd-btn) { padding-block: 13px; }
.fnd .rs3-guide .fnd-tbl + p,
.fnd .rs3-guide .rs3-steps + p,
.fnd .rs3-guide .rs3-code + p { margin-top: var(--fnd-s3); }
/* Feed addresses in the guide's tables break only where they must. */
.fnd .rs3-guide .fnd-tbl code { overflow-wrap: anywhere; word-break: normal; }

/* The steps: the shared numbered heads, a paragraph under each. */
.rs3-steps { list-style: none; margin: var(--fnd-s4) 0 0; padding: 0; }
.rs3-steps li + li { margin-top: var(--fnd-s5); }
.rs3-steps .fnd-numhead { margin-bottom: var(--fnd-s2); }
.fnd .rs3-steps .fnd-numhead__t { font-size: var(--fnd-t-h3); }
.rs3-steps p { margin: 0; padding-left: calc(32px + var(--fnd-s3)); }
@media (max-width: 559px) {
  .rs3-steps p { padding-left: 0; }
}

/* Anything hidden stays hidden, whatever a shared part sets its display
   to (a text button is inline-flex, a help line is block). */
.fnd .rs3 [hidden] { display: none !important; }
