/* ============================================================
   youtube_summarizer.css
   Sandbox — YouTube Summarizer Tool
   All classes prefixed: yts-
   Inherits tokens from tokens.css (already loaded by dashboard)
   ============================================================ */

/* ── Reset scoped to this page ── */
.yts-page *,
.yts-page *::before,
.yts-page *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ══════════════════════════════════════════════
   PAGE ROOT
══════════════════════════════════════════════ */
.yts-page {
  width: 100%;
  min-height: 100%;
  padding: var(--space-8) var(--space-8) var(--space-16);
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  color: var(--text);
  font-family: var(--font);
  position: relative;
}

/* ══════════════════════════════════════════════
   LOADING OVERLAY
══════════════════════════════════════════════ */
.yts-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(9, 9, 11, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms var(--ease);
}

.yts-overlay--visible {
  opacity: 1;
  pointer-events: all;
}

.yts-overlay__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
}

.yts-overlay__letters {
  display: flex;
  gap: 2px;
  font-family: var(--font);
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  letter-spacing: -0.03em;
  color: var(--text);
}

.yts-overlay__letters span {
  opacity: 0;
  transform: translateY(16px);
  animation: yts-letter-in 500ms var(--ease) forwards;
}

/* Stagger each letter */
.yts-overlay__letters span:nth-child(1)  { animation-delay: 0ms; }
.yts-overlay__letters span:nth-child(2)  { animation-delay: 40ms; }
.yts-overlay__letters span:nth-child(3)  { animation-delay: 80ms; }
.yts-overlay__letters span:nth-child(4)  { animation-delay: 120ms; }
.yts-overlay__letters span:nth-child(5)  { animation-delay: 160ms; }
.yts-overlay__letters span:nth-child(6)  { animation-delay: 200ms; }
.yts-overlay__letters span:nth-child(7)  { animation-delay: 240ms; }
.yts-overlay__letters span:nth-child(8)  { animation-delay: 280ms; }
.yts-overlay__letters span:nth-child(9)  { animation-delay: 320ms; }
.yts-overlay__letters span:nth-child(10) { animation-delay: 360ms; }
.yts-overlay__letters span:nth-child(11) { animation-delay: 400ms; }
.yts-overlay__letters span:nth-child(12) { animation-delay: 420ms; }
.yts-overlay__letters span:nth-child(13) { animation-delay: 440ms; }

@keyframes yts-letter-in {
  to { opacity: 1; transform: translateY(0); }
}

.yts-overlay__bar {
  width: 240px;
  height: 2px;
  background: var(--surface-2);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.yts-overlay__bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: var(--radius-pill);
  transition: width 400ms var(--ease);
  box-shadow: 0 0 12px var(--accent-glow);
}

.yts-overlay__hint {
  font-size: var(--text-sm);
  color: var(--text-muted);
  letter-spacing: 0.01em;
  transition: opacity 200ms;
}
.aie-why, .brn-why, .cmg-why, .cl-why, .yts-why {
  --why-card-bg:           rgba(255,255,255,0.035);
  --why-card-bg-hover:     rgba(255,255,255,0.065);
  --why-card-border:       rgba(255,255,255,0.075);
  --why-card-border-hover: rgba(255,255,255,0.14);
  --why-icon-bg:           rgba(255,255,255,0.07);
  --why-icon-border:       rgba(255,255,255,0.10);
  --why-icon-color:        rgba(255,255,255,0.72);
  --why-heading-color:     #ffffff;
  --why-label-color:       rgba(255,255,255,0.92);
  --why-desc-color:        rgba(255,255,255,0.45);
  --why-sub-color:         rgba(255,255,255,0.45);
  --why-radius-card:       14px;
  --why-radius-icon:       9px;
}
 
/* ── Shared card / grid structure (applied via each prefix) ── */
.aie-why-card, .brn-why-card, .cmg-why-card, .cl-why-card, .yts-why-card {
  background: var(--why-card-bg);
  border: 1px solid var(--why-card-border);
  border-radius: var(--why-radius-card);
  padding: 1.3rem 1.15rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
 
.aie-why-card:hover, .brn-why-card:hover, .cmg-why-card:hover,
.cl-why-card:hover, .yts-why-card:hover {
  background: var(--why-card-bg-hover);
  border-color: var(--why-card-border-hover);
  transform: translateY(-2px);
}
 
.aie-why-icon, .brn-why-icon, .cmg-why-icon, .cl-why-icon, .yts-why-icon {
  width: 34px;
  height: 34px;
  background: var(--why-icon-bg);
  border: 1px solid var(--why-icon-border);
  border-radius: var(--why-radius-icon);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.3rem;
  flex-shrink: 0;
}
 
.aie-why-icon svg, .brn-why-icon svg, .cmg-why-icon svg,
.cl-why-icon svg, .yts-why-icon svg {
  width: 16px;
  height: 16px;
  color: var(--why-icon-color);
}
 
.aie-why-label, .brn-why-label, .cmg-why-label,
.cl-why-label, .yts-why-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--why-label-color);
  margin: 0;
}
 
.aie-why-desc, .brn-why-desc, .cmg-why-desc,
.cl-why-desc, .yts-why-desc {
  font-size: 0.855rem;
  color: var(--why-desc-color);
  line-height: 1.65;
  margin: 0;
}
 
.cmg-why-desc code {
  font-family: monospace;
  font-size: 0.8rem;
  background: rgba(255,255,255,0.07);
  padding: 1px 5px;
  border-radius: 4px;
}
 
.yts-why {
  width: 100%;
  max-width: 860px;
  margin: 4rem auto 2rem;
  padding: 0 1.25rem;
}
 
.yts-why-heading {
  font-size: clamp(1.4rem, 2.8vw, 1.85rem);
  font-weight: 700;
  color: var(--why-heading-color);
  text-align: center;
  margin: 0 0 0.55rem;
  letter-spacing: -0.022em;
}
 
.yts-why-sub {
  font-size: 0.9rem;
  color: var(--why-sub-color);
  text-align: center;
  max-width: 500px;
  margin: 0 auto 2.25rem;
  line-height: 1.65;
}
 
.yts-why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
 
@media (max-width: 720px) { .yts-why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .yts-why-grid { grid-template-columns: 1fr; } }
 


/* ══════════════════════════════════════════════
   HERO
══════════════════════════════════════════════ */
.yts-hero {
  padding-top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.yts-hero__eyebrow {
  display: flex;
  align-items: center;
}

.yts-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--text-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.yts-badge__icon {
  width: 11px;
  height: 11px;
  color: var(--accent);
  flex-shrink: 0;
}

.yts-hero__heading {
  font-size: clamp(28px, 4vw, 52px);
  font-weight: var(--weight-bold);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 0.28em;
}

/* Rotating word container */
.yts-hero__rotating-wrap {
  display: inline-block;
  height: 1.1em;
  overflow: hidden;
  vertical-align: bottom;
  position: relative;
}

.yts-hero__rotating-track {
  display: flex;
  flex-direction: column;
  transition: transform 500ms var(--ease);
  will-change: transform;
}

.yts-hero__rotating-word {
  display: block;
  height: 1.1em;
  line-height: 1.1;
  white-space: nowrap;
  color: var(--accent);
  font-style: italic;
}

.yts-hero__sub {
  font-size: var(--text-md);
  color: var(--text-muted);
  font-weight: var(--weight-normal);
  max-width: 560px;
  line-height: 1.6;
}

/* ══════════════════════════════════════════════
   SECTION WRAPPER
══════════════════════════════════════════════ */
.yts-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* ══════════════════════════════════════════════
   GLASS CARD BASE
══════════════════════════════════════════════ */
.yts-glass-card {
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
}

/* ══════════════════════════════════════════════
   INPUT CARD
══════════════════════════════════════════════ */
.yts-input-card {
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}

.yts-input-card--focused {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-focus), 0 0 32px var(--accent-glow);
}

.yts-input-card__header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.yts-yt-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.yts-input-card__label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-soft);
  letter-spacing: 0.01em;
}

.yts-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.yts-url-input {
  width: 100%;
  background: var(--surface-0);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  padding: 14px 100px 14px var(--space-5);
  font-family: var(--font);
  font-size: var(--text-base);
  color: var(--text);
  outline: none;
  transition: border-color 200ms var(--ease), background 200ms var(--ease);
  caret-color: var(--accent);
}

.yts-url-input::placeholder {
  color: var(--text-muted);
}

.yts-url-input:focus {
  border-color: var(--border-focus);
  background: var(--surface-1);
}

.yts-input-actions {
  position: absolute;
  right: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.yts-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border-1);
  color: var(--text-soft);
  cursor: pointer;
  transition: background 150ms, color 150ms, border-color 150ms;
}

.yts-icon-btn svg {
  width: 16px;
  height: 16px;
}

.yts-icon-btn:hover {
  background: var(--surface-3);
  color: var(--text);
  border-color: var(--border-2);
}

.yts-icon-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.yts-input-card__error {
  font-size: var(--text-xs);
  color: var(--error);
  min-height: 16px;
  padding-left: var(--space-1);
  letter-spacing: 0.01em;
}

/* ── VIDEO PREVIEW ── */
.yts-preview {
  display: none;
  align-items: flex-start;
  gap: var(--space-5);
  padding: var(--space-4);
  background: var(--surface-0);
  border: 1px solid var(--border-0);
  border-radius: var(--radius-lg);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 300ms var(--ease), transform 300ms var(--ease);
}

.yts-preview--visible {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.yts-preview__thumb-wrap {
  position: relative;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.yts-preview__thumb {
  width: 160px;
  height: 90px;
  object-fit: cover;
  display: block;
  background: var(--surface-2);
}

.yts-preview__duration {
  position: absolute;
  bottom: 5px;
  right: 6px;
  background: rgba(0,0,0,0.82);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.yts-preview__meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-top: 2px;
  min-width: 0;
}

.yts-preview__title {
  font-size: var(--text-base);
  font-weight: var(--weight-semi);
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.yts-preview__channel {
  font-size: var(--text-sm);
  color: var(--accent);
  font-weight: var(--weight-medium);
}

.yts-preview__date {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ══════════════════════════════════════════════
   SETTINGS
══════════════════════════════════════════════ */
.yts-settings-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.yts-settings-group--half {
  flex: 1 1 0;
  min-width: 200px;
}

.yts-settings-group__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semi);
  color: var(--text-soft);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Summary Style Grid */
.yts-style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-3);
}

.yts-style-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-4);
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-align: left;
  color: var(--text-soft);
  transition: background 150ms, border-color 150ms, color 150ms, transform 150ms var(--ease-spring), box-shadow 150ms;
  will-change: transform;
}

.yts-style-card:hover {
  background: var(--surface-2);
  border-color: var(--border-2);
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.yts-style-card--active {
  background: var(--surface-2);
  border-color: var(--border-focus);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--border-focus), var(--shadow-sm);
}

.yts-style-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.yts-style-card__icon {
  font-size: 20px;
  line-height: 1;
}

.yts-style-card__name {
  font-size: var(--text-sm);
  font-weight: var(--weight-semi);
  letter-spacing: 0.01em;
}

.yts-style-card__desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Settings Row */
.yts-settings-row {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
}

/* Segmented Control */
.yts-segment {
  position: relative;
  display: inline-flex;
  gap: 0;
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  padding: 4px;
  overflow: hidden;
}

.yts-segment__pill {
  position: absolute;
  top: 4px;
  left: 4px;
  height: calc(100% - 8px);
  background: var(--surface-3);
  border-radius: calc(var(--radius-lg) - 4px);
  border: 1px solid var(--border-2);
  transition: left 200ms var(--ease), width 200ms var(--ease);
  pointer-events: none;
  z-index: 0;
}

.yts-segment__btn {
  position: relative;
  z-index: 1;
  padding: 8px 20px;
  border: none;
  background: transparent;
  border-radius: calc(var(--radius-lg) - 4px);
  font-family: var(--font);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 150ms;
  white-space: nowrap;
}

.yts-segment__btn--active {
  color: var(--text);
}

.yts-segment__btn:hover:not(.yts-segment__btn--active) {
  color: var(--text-soft);
}

.yts-segment__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Tone grid */
.yts-tone-grid {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.yts-tone-btn {
  padding: 8px 18px;
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-pill);
  font-family: var(--font);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 150ms, border-color 150ms, color 150ms, box-shadow 150ms;
}

.yts-tone-btn:hover {
  background: var(--surface-2);
  color: var(--text-soft);
}

.yts-tone-btn--active {
  background: var(--surface-2);
  border-color: var(--border-focus);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--border-focus);
}

.yts-tone-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── GENERATE BUTTON ── */
.yts-cta-wrap {
  display: flex;
  justify-content: flex-start;
  padding-top: var(--space-2);
}

.yts-generate-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: var(--radius-xl);
  cursor: pointer;
  background: transparent;
  overflow: hidden;
  transition: transform 150ms var(--ease-spring), box-shadow 200ms;
}

.yts-generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(255,255,255,0.06);
}

.yts-generate-btn:active {
  transform: translateY(0);
}

.yts-generate-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Animated gradient border via pseudo-element trick */
.yts-generate-btn__gradient {
  position: absolute;
  inset: 0;
  background: conic-gradient(from 0deg, #a1a1aa, #ffffff, #a1a1aa, #71717a, #ffffff, #a1a1aa);
  border-radius: var(--radius-xl);
  animation: yts-spin-gradient 3s linear infinite;
  padding: 1px;
}

@keyframes yts-spin-gradient {
  to { transform: rotate(360deg); }
}

.yts-generate-btn__content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 14px 36px;
  margin: 1.5px;
  background: var(--ink-6);
  border-radius: calc(var(--radius-xl) - 2px);
  font-family: var(--font);
  font-size: var(--text-base);
  font-weight: var(--weight-semi);
  color: var(--text);
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: background 150ms;
}

.yts-generate-btn:hover .yts-generate-btn__content {
  background: var(--ink-5);
}

.yts-generate-btn__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--accent);
}

.yts-generate-btn--loading .yts-generate-btn__icon {
  animation: yts-spin 800ms linear infinite;
}

@keyframes yts-spin {
  to { transform: rotate(360deg); }
}

/* ══════════════════════════════════════════════
   RESULTS SECTION
══════════════════════════════════════════════ */
.yts-results {
  display: none;
  flex-direction: column;
  gap: var(--space-6);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 400ms var(--ease), transform 400ms var(--ease);
}

.yts-results--visible {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.yts-results__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.yts-results__title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--text);
  letter-spacing: -0.02em;
}

.yts-results__actions {
  display: flex;
  gap: var(--space-2);
}

.yts-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 16px;
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-pill);
  font-family: var(--font);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--text-soft);
  cursor: pointer;
  transition: background 150ms, color 150ms, border-color 150ms;
}

.yts-pill-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.yts-pill-btn:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-2);
}

.yts-pill-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Cards Grid */
.yts-cards-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* ── RESULT CARD ── */
.yts-result-card {
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-xl);
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 400ms var(--ease), transform 400ms var(--ease), border-color 200ms;
  will-change: transform, opacity;
}

.yts-result-card--visible {
  opacity: 1;
  transform: translateY(0);
}

.yts-result-card:hover {
  border-color: var(--border-2);
}

.yts-result-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  cursor: pointer;
  user-select: none;
  transition: background 150ms;
}

.yts-result-card__header:hover {
  background: var(--surface-0);
}

.yts-result-card__header:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.yts-result-card__heading-group {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.yts-result-card__icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  font-size: 16px;
  flex-shrink: 0;
}

.yts-result-card__title {
  font-size: var(--text-base);
  font-weight: var(--weight-semi);
  color: var(--text);
  letter-spacing: -0.01em;
}

.yts-result-card__subtitle {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

.yts-result-card__controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.yts-result-card__copy {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 150ms, color 150ms, border-color 150ms;
}

.yts-result-card__copy svg {
  width: 14px;
  height: 14px;
}

.yts-result-card__copy:hover {
  background: var(--surface-2);
  border-color: var(--border-1);
  color: var(--text);
}

.yts-result-card__copy:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.yts-result-card__chevron {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: transform 250ms var(--ease);
}

.yts-result-card--collapsed .yts-result-card__chevron {
  transform: rotate(-90deg);
}

.yts-result-card__body {
  overflow: hidden;
  max-height: 2000px;
  transition: max-height 350ms var(--ease), padding 200ms var(--ease);
  padding: 0 var(--space-6) var(--space-6);
}

.yts-result-card--collapsed .yts-result-card__body {
  max-height: 0;
  padding-bottom: 0;
}

/* ── Body content types ── */
.yts-prose {
  font-size: var(--text-base);
  color: var(--text-soft);
  line-height: 1.75;
}

.yts-prose p + p {
  margin-top: var(--space-4);
}

/* Key Points list */
.yts-key-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.yts-key-list__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-base);
  color: var(--text-soft);
  line-height: 1.6;
}

.yts-key-list__bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 8px;
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ── TIMELINE ── */
.yts-timeline {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 24px;
}

.yts-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--border-2), var(--border-0));
}

.yts-timeline__item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-4) 0 var(--space-4) var(--space-4);
}

.yts-timeline__item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1.5px solid var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.yts-timeline__time {
  font-size: var(--text-xs);
  font-weight: var(--weight-semi);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.yts-timeline__text {
  font-size: var(--text-base);
  color: var(--text-soft);
  line-height: 1.6;
}

/* ── QUOTES ── */
.yts-quotes {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.yts-quote-card {
  padding: var(--space-4) var(--space-5);
  background: var(--surface-0);
  border: 1px solid var(--border-0);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.yts-quote-card__text {
  font-size: var(--text-base);
  color: var(--text-soft);
  line-height: 1.7;
  font-style: italic;
}

.yts-quote-card__time {
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ── ACTION ITEMS ── */
.yts-action-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.yts-action-list__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-base);
  color: var(--text-soft);
  line-height: 1.6;
}

.yts-action-check {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border-2);
  border-radius: 5px;
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-1);
}

/* ── KEYWORDS ── */
.yts-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.yts-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--text-soft);
  cursor: default;
  transition: background 150ms, border-color 150ms, color 150ms, transform 150ms var(--ease-spring);
}

.yts-chip:hover {
  background: var(--surface-2);
  border-color: var(--border-2);
  color: var(--text);
  transform: translateY(-2px);
}

/* ══════════════════════════════════════════════
   COPY SUCCESS STATE
══════════════════════════════════════════════ */
.yts-result-card__copy--copied {
  color: var(--success);
  border-color: rgba(34,197,94,0.3);
  background: rgba(34,197,94,0.08);
}

/* ══════════════════════════════════════════════
   DIVIDER
══════════════════════════════════════════════ */
.yts-divider {
  width: 100%;
  height: 1px;
  background: var(--border-0);
  border: none;
}

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 900px) {
  .yts-page {
    padding: var(--space-6) var(--space-6) var(--space-12);
  }

  .yts-style-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .yts-settings-row {
    flex-direction: column;
    gap: var(--space-6);
  }

  .yts-hero__heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
}

@media (max-width: 640px) {
  .yts-page {
    padding: var(--space-5) var(--space-4) var(--space-10);
    gap: var(--space-6);
  }

  .yts-preview {
    flex-direction: column;
  }

  .yts-preview__thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }

  .yts-style-grid {
    grid-template-columns: 1fr 1fr;
  }

  .yts-generate-btn__content {
    padding: 13px 28px;
  }

  .yts-results__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .yts-segment__btn {
    padding: 8px 14px;
  }
}

@media (max-width: 380px) {
  .yts-style-grid {
    grid-template-columns: 1fr;
  }

  .yts-tone-grid {
    gap: var(--space-2);
  }
}

/* ══════════════════════════════════════════════
   REDUCED MOTION
══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .yts-hero__rotating-track,
  .yts-generate-btn__gradient,
  .yts-overlay__letters span,
  .yts-result-card,
  .yts-results,
  .yts-preview {
    animation: none !important;
    transition: none !important;
  }

  .yts-hero__rotating-track {
    transform: none !important;
  }

  .yts-result-card {
    opacity: 1;
    transform: none;
  }
}
.yts-pill-btn--bookmarked {
  color: var(--accent);
  border-color: var(--border-focus);
  background: var(--accent-dim);
  cursor: default;
}

.yts-pill-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}