/* The YouTube tags checker and the YouTube timestamp generator (/youtube-tags-checker, /youtube-timestamp-generator): the
   tools' page (tool.css) with one sheet in one column, as the letter generators (letters.css) set it. The text in a well,
   then what's left (or how far over) in the display weight with its meter, then the result: each tag with its count, or
   the chapters as YouTube reads them, then Copy, then the line about Flaghand and the pennant. */
.ytags .tool { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 32px; }
.ytags .write { border-radius: 12px; background: var(--muted); transition: background .15s ease-out; }
.ytags .write:focus-within { background: color-mix(in srgb, var(--muted) 92%, var(--foreground)); }
.ytags .write textarea { min-height: 176px; padding: 20px 22px; border: 0; font-size: 18px; line-height: 1.5; resize: vertical; overflow: auto; }
.ytags .tool .write textarea:focus-visible { outline: none; }

.ytags .sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: 24px 0 0; }
.ytags .sum .left { margin: 0; font-size: 18px; color: var(--foreground-soft); }
.ytags .sum .left b { margin-right: 8px; font-size: 56px; font-weight: 700; line-height: 1; letter-spacing: -0.04em; color: var(--foreground); font-variant-numeric: tabular-nums; }
.ytags .sum .count { margin: 0; font-size: 15px; color: var(--muted-foreground); }
.ytags .meter { height: 3px; margin: 16px 0 0; border-radius: 2px; background: var(--border); overflow: hidden; }
.ytags .meter i { display: block; width: 0; height: 100%; background: var(--foreground); transition: width .15s ease-out; }
.ytags .over .sum .left b, .ytags .over .sum .left span { color: var(--destructive); }
.ytags .over .meter i { background: var(--destructive); }

/* Each tag as a chip: its words, then its count; past 500 or refused, in the destructive ink. */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.tag-list:empty { display: none; }
.tag-list li { display: inline-flex; align-items: baseline; gap: 8px; max-width: 100%; padding: 6px 12px; border-radius: 999px; background: var(--muted); font-size: 15.5px; line-height: 1.4; }
.tag-list li span { overflow-wrap: anywhere; }
.tag-list li b { font-size: 13px; font-weight: 600; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.tag-list li.past, .tag-list li.bad { background: color-mix(in srgb, var(--destructive) 14%, transparent); color: var(--destructive); text-decoration: line-through; text-decoration-thickness: 1px; }
.tag-list li.past b, .tag-list li.bad b { color: var(--destructive); }

/* The chapters as YouTube reads them: a row each, its time, its title and how long it runs. */
.chapters { margin: 20px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.chapters:empty { display: none; }
.chapters li { display: grid; grid-template-columns: 5.5em minmax(0, 1fr) auto; align-items: baseline; gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 16px; }
.chapters li time { font-weight: 600; font-variant-numeric: tabular-nums; }
.chapters li span { overflow-wrap: anywhere; }
.chapters li small { font-size: 14px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chapters li.bad time, .chapters li.bad small { color: var(--destructive); }

.len-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 16px 0 0; font-size: 15px; color: var(--foreground-soft); }
.len-row span { color: var(--muted-foreground); }
.len-row input { width: 7em; height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--muted); font: inherit; font-size: 16px; font-variant-numeric: tabular-nums; color: var(--foreground); }
.len-row input:focus-visible { outline: 2px solid var(--foreground); outline-offset: 0; }
.len-row input[aria-invalid="true"] { outline: 2px solid var(--destructive); }
.quiet-btn { height: 40px; margin: 12px 0 0; padding: 0 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--background); color: var(--foreground); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.quiet-btn:hover { background: var(--muted); }
.quiet-btn[hidden] { display: none; }
.ytags .verdict:empty { display: none; }
.ytags .verdict { margin: 24px 0 0; font-size: 22px; font-weight: 600; line-height: 1.3; letter-spacing: -0.02em; }
.ytags .over .verdict { color: var(--destructive); }
.ytags .fixes { margin: 8px 0 0; padding-left: 1.2em; font-size: 16px; line-height: 1.5; color: var(--foreground-soft); }
.ytags .fixes:empty { display: none; }
.ytags .notes { min-height: 1.5em; margin: 16px 0 0; font-size: 15px; line-height: 1.5; color: var(--foreground-soft); }

.ytags .copy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 20px; }
.ytags .copy-row p { margin: 0; font-size: 15px; color: var(--muted-foreground); }
.ytags .copy {
  display: inline-flex; align-items: center; justify-content: center; height: 44px; min-width: 120px; padding: 0 20px;
  border: 0; border-radius: 12px; background: var(--foreground); color: var(--background); font-size: 16px; font-weight: 600; white-space: nowrap; cursor: pointer;
  transition: opacity .15s ease-out;
}
.ytags .copy:hover { opacity: .88; }
.ytags .copy:disabled { opacity: .35; cursor: default; }

.ytags .next { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border); }
.ytags .next p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--foreground); }

@media (max-width: 759px) {
  .ytags .tool { padding: 20px; }
  .ytags .write textarea { min-height: 140px; font-size: 17px; }
  .ytags .sum .left b { font-size: 44px; }
  .ytags .copy { height: 48px; }
  .chapters li { grid-template-columns: 4.5em minmax(0, 1fr); }
  .chapters li small { grid-column: 2; }
  .ytags .next { flex-direction: column; align-items: stretch; }
}
