/* ==========================================================================
   App layer: auth, catalog and detail pages on top of the storefront styles.
   Reuses the tokens defined in styles.css.
   ========================================================================== */

/* --- header auth slot ----------------------------------------------------- */
.auth-slot {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.25rem;
  max-width: 220px;
  padding: 0 0.5rem 0 0.25rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--frost);
  font-size: 13px;
  font-weight: 600;
}

.user-chip:hover {
  background: var(--frost-hover);
}

.user-chip__avatar {
  display: grid;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  place-items: center;
  border-radius: 999px;
  background: #121313;
  color: #f4ff71;
  font-size: 12px;
  font-weight: 700;
}

.user-chip__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-pop {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 60;
  width: 264px;
  padding: 6px;
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 16px 44px rgba(18, 19, 19, 0.16), 0 0 0 1px rgba(18, 19, 19, 0.07);
}

.user-pop__head {
  padding: 0.5rem 0.625rem 0.625rem;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 4px;
}

.user-pop__email {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-pop__plan {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted-fg);
}

.user-pop__item {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.625rem;
  border-radius: 10px;
  font-size: 13px;
  text-align: left;
}

.user-pop__item:hover {
  background: var(--muted);
}

.user-pop__item--danger {
  color: #a02622;
}

.user-pop__label {
  padding: 0.5rem 0.625rem 0.25rem;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(var(--ink-rgb), 0.45);
}

.user-pop__tenant {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.625rem;
  border-radius: 10px;
  font-size: 13px;
}

.user-pop__tenant:hover {
  background: var(--muted);
}

.user-pop__tenant[aria-current="true"] {
  background: var(--muted);
  font-weight: 600;
}

/* --- subscription banner -------------------------------------------------- */
.sub-banner {
  background: #121313;
  color: #fff;
}

.sub-banner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0.625rem 1rem;
  font-size: 13px;
}

@media (min-width: 640px) {
  .sub-banner__inner {
    padding-left: 1.5rem;
    padding-right: 1.75rem;
  }
}

.sub-banner__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f4ff71;
  box-shadow: 0 0 0 4px rgba(244, 255, 113, 0.18);
}

.sub-banner__text {
  min-width: 0;
}

.sub-banner__text strong {
  font-weight: 600;
}

.sub-banner__actions {
  display: flex;
  margin-left: auto;
  gap: 0.5rem;
}

.sub-banner__btn {
  display: inline-flex;
  height: 1.9rem;
  align-items: center;
  padding: 0 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.sub-banner__btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* --- auth dialog ---------------------------------------------------------- */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  background: rgba(18, 19, 19, 0.4);
  backdrop-filter: blur(4px);
}

.auth-overlay[data-open="true"] {
  display: flex;
}

.auth-card {
  position: relative;
  width: min(420px, 100%);
  max-height: calc(100dvh - 3rem);
  overflow-y: auto;
  padding: 1.75rem;
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 24px 60px rgba(18, 19, 19, 0.3);
}

.auth-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 999px;
  font-size: 20px;
  line-height: 1;
  color: var(--muted-fg);
}

.auth-close:hover {
  background: var(--muted);
  color: var(--fg);
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.auth-sub {
  margin-top: 0.25rem;
  font-size: 13px;
  color: var(--muted-fg);
}

.auth-tabs {
  display: flex;
  gap: 4px;
  margin: 1.25rem 0 1rem;
  padding: 4px;
  border-radius: 12px;
  background: var(--muted);
}

.auth-tab {
  flex: 1;
  height: 2rem;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-fg);
}

.auth-tab.is-active {
  background: var(--card);
  color: var(--fg);
  box-shadow: 0 1px 0 rgba(18, 19, 19, 0.04), 0 6px 16px rgba(18, 19, 19, 0.06);
}

.auth-form {
  display: grid;
  gap: 0.75rem;
}

.auth-field {
  display: grid;
  gap: 0.3rem;
  font-size: 12.5px;
  font-weight: 600;
}

.auth-field[hidden],
.auth-error[hidden] {
  display: none;
}

.auth-field em {
  font-style: normal;
  font-weight: 400;
  color: var(--muted-fg);
}

.auth-field input {
  height: 2.5rem;
  padding: 0 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 14px;
  font-weight: 400;
}

.auth-field input:focus {
  outline: 2px solid rgba(18, 19, 19, 0.25);
  outline-offset: 1px;
}

.auth-error {
  padding: 0.5rem 0.625rem;
  border-radius: 8px;
  background: #fdecea;
  color: #7a1c14;
  font-size: 12.5px;
}

.auth-divider {
  position: relative;
  margin: 1rem 0;
  text-align: center;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-fg);
}

.auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--hairline);
}

.auth-divider span {
  position: relative;
  padding: 0 0.5rem;
  background: var(--card);
}

.auth-fine {
  margin-top: 1rem;
  font-size: 11px;
  color: var(--muted-fg);
  text-align: center;
}

/* --- catalog -------------------------------------------------------------- */
.page-shell {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .page-shell {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .page-shell {
    padding: 0 2rem;
  }
}

.skills-page {
  padding: 2.5rem 0 4rem;
}

.skills-head {
  display: grid;
  gap: 0.75rem;
  max-width: 720px;
}

.skills-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.skills-sub {
  color: rgba(var(--ink-rgb), 0.6);
  line-height: 1.7;
}

.skills-search {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.skills-search input {
  flex: 1;
  height: 2.75rem;
  padding: 0 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--frost);
  color: var(--fg);
  font: inherit;
  font-size: 14px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 1.75rem;
}

.filter-chip {
  display: inline-flex;
  height: 2rem;
  align-items: center;
  padding: 0 0.875rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(var(--ink-rgb), 0.65);
}

.filter-chip:hover {
  background: var(--frost);
}

.filter-chip.is-active {
  background: #121313;
  border-color: #121313;
  color: #fff;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.75rem 1.25rem;
}

.marketplace {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 2rem;
  padding: 2rem 0 5rem;
}

.market-filters {
  position: sticky;
  top: 5.5rem;
  align-self: start;
  max-height: calc(100vh - 6.5rem);
  overflow: auto;
  padding-right: 1.35rem;
  border-right: 1px solid var(--border);
}

.market-filters__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
}

.market-filter-group {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.market-filter-group > p {
  margin: 0 0 0.55rem;
  color: var(--muted-fg);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.market-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 1.8rem;
  color: rgba(var(--ink-rgb), 0.6);
  font-size: 12px;
  font-weight: 500;
}

.market-check:hover,
.market-check.is-active {
  color: var(--fg);
}

.market-check__box {
  position: relative;
  width: 14px;
  height: 14px;
  flex: none;
  border: 1px solid rgba(var(--ink-rgb), 0.22);
  border-radius: 4px;
  background: transparent;
}

.market-check.is-active .market-check__box {
  background: #121313;
  border-color: #121313;
}

.market-check.is-active .market-check__box::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 7px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.market-check__count {
  margin-left: auto;
  color: rgba(var(--ink-rgb), 0.4);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.marketplace__head h1 {
  margin: 0;
  font-family: var(--font-brand);
  font-size: clamp(2rem, 3.4vw, 3.2rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.05em;
}

.marketplace__head p {
  max-width: 720px;
  margin: 0.55rem 0 0;
  color: rgba(var(--ink-rgb), 0.55);
  font-size: 13px;
}

.market-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 1.75rem 0 1.35rem;
}

.market-toolbar__count {
  color: var(--muted-fg);
  font-size: 12px;
  font-weight: 600;
}

.market-search {
  display: flex;
  flex: 1;
  min-width: 220px;
  max-width: 420px;
  gap: 0.4rem;
}

.market-search input,
.market-sort select {
  height: 2.35rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--frost);
  color: var(--fg);
  font: inherit;
  font-size: 12.5px;
}

.market-search input {
  flex: 1;
  min-width: 0;
  padding: 0 0.9rem;
}

.market-sort {
  margin-left: auto;
}

.market-sort select {
  padding: 0 2rem 0 0.85rem;
}

.skills-grid--market {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.6rem 1rem;
}

@media (max-width: 1180px) {
  .skills-grid--market {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .marketplace {
    grid-template-columns: 1fr;
  }
  .market-filters {
    position: static;
    max-height: none;
    padding: 0 0 1rem;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .skills-grid--market {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .skills-grid--market {
    grid-template-columns: 1fr;
  }
  .market-sort {
    margin-left: 0;
  }
}

/* --- system feedback ------------------------------------------------------ */
.auth-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  background: #fdecea;
  border-bottom: 1px solid #f2c2bd;
  color: #7a1c14;
  font-size: 13px;
  line-height: 1.5;
}

.auth-banner__detail {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  opacity: 0.75;
  word-break: break-word;
}

.auth-banner__close {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 18px;
  line-height: 1;
  color: inherit;
  opacity: 0.6;
}

.auth-banner__close:hover {
  opacity: 1;
}

.app-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100;
  max-width: min(440px, calc(100vw - 32px));
  transform: translateX(-50%);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: #121313;
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 16px 40px rgba(18, 19, 19, 0.28);
  transition: opacity 0.3s, transform 0.3s;
}

.app-toast.is-leaving {
  opacity: 0;
  transform: translateX(-50%) translateY(8px);
}

.user-pop__role {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted-fg);
}

.skills-empty {
  padding: 3rem 0;
  color: var(--muted-fg);
}

.skills-empty a {
  text-decoration: underline;
}

.card__badge--pro {
  border-color: rgba(18, 19, 19, 0.15);
  background: rgba(18, 19, 19, 0.82);
  color: #fff;
  backdrop-filter: blur(8px);
}

.card__output {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* --- skill detail --------------------------------------------------------- */
.skill-detail {
  padding: 1.5rem 0 4rem;
}

.detail-crumbs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  font-size: 12.5px;
  color: var(--muted-fg);
}

.detail-crumbs a:hover {
  color: var(--fg);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

.detail-main {
  max-width: 920px;
}

.detail-preview {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  aspect-ratio: 16 / 9;
}

.detail-preview img,
.detail-preview video {
  width: 100%;
  height: 100%;
  display: block;
}

.detail-preview img {
  object-fit: contain;
}

.detail-preview video {
  object-fit: cover;
}

.card__video {
  background: #0b0b0b;
}

.detail-title {
  margin-top: 1.25rem;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.detail-summary {
  margin-top: 0.75rem;
  max-width: 60ch;
  line-height: 1.7;
  color: rgba(var(--ink-rgb), 0.62);
}

.detail-stats {
  display: flex;
  gap: 1.25rem;
  margin-top: 1rem;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(var(--ink-rgb), 0.55);
}

.detail-gallery {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.detail-gallery__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.detail-gallery__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.detail-gallery__count {
  font-size: 12px;
  font-weight: 600;
  color: rgba(var(--ink-rgb), 0.45);
}

.detail-gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 0.75rem;
}

.detail-gallery__item {
  display: block;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f7f7f5;
}

.detail-gallery__item img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform 180ms ease;
}

.detail-gallery__item:hover img {
  transform: scale(1.015);
}

@media (max-width: 640px) {
  .detail-gallery__grid {
    grid-template-columns: 1fr;
  }
}

/* --- AI videos ------------------------------------------------------------ */
.ai-index,
.ai-collection,
.ai-detail {
  padding: 2.5rem 0 5rem;
}

.ai-hero {
  max-width: 860px;
  margin: 0 auto 3.5rem;
  text-align: center;
}

.ai-hero__title,
.ai-index h1 {
  margin: 0.7rem 0 1rem;
  font-family: var(--font-brand);
  font-size: clamp(2.5rem, 7vw, 5.8rem);
  font-weight: 600;
  line-height: 0.93;
  letter-spacing: -0.07em;
}

.ai-hero__sub {
  max-width: 620px;
  margin: 0 auto;
  color: rgba(var(--ink-rgb), 0.62);
  font-size: 16px;
  line-height: 1.65;
}

.ai-hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.ai-hero__proof {
  margin-top: 1.25rem;
  color: rgba(var(--ink-rgb), 0.46);
  font-size: 12.5px;
}

.ai-landing-showcase {
  display: grid;
  gap: 1.5rem;
  margin: 0 0 3.5rem;
}

.ai-landing-hero {
  margin: 0;
  overflow: hidden;
  border-radius: 20px;
  background: #0e0f0e;
}

.ai-landing-hero video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.ai-pair-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.ai-pair h3 {
  margin: 0 0 0.55rem;
  font-size: 13px;
  font-weight: 600;
}

.ai-pair__videos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.ai-pair figure,
.ai-motion-grid figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(var(--ink-rgb), 0.035);
}

.ai-pair video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000;
}

.ai-pair figcaption,
.ai-motion-grid figcaption {
  padding: 0.5rem 0.65rem;
  color: var(--muted-fg);
  font-size: 10.5px;
  font-weight: 600;
}

.ai-motion-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.ai-motion-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.ai-collection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.ai-collection-card {
  display: block;
  color: inherit;
}

.ai-collection-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #171817;
}

.ai-collection-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.ai-collection-card:hover .ai-collection-card__media img {
  transform: scale(1.025);
}

.ai-collection-card__count {
  position: absolute;
  right: 0.8rem;
  bottom: 0.8rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

.ai-collection-card__eyebrow {
  margin: 1rem 0 0.35rem;
  color: var(--muted-fg);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ai-collection-card h2 {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.ai-collection-card > p:last-child {
  margin-top: 0.5rem;
  color: rgba(var(--ink-rgb), 0.58);
  font-size: 13.5px;
  line-height: 1.55;
}

.ai-browser__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.ai-browser__head h2 {
  margin: 0.35rem 0 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  letter-spacing: -0.04em;
}

.ai-browser__total {
  color: var(--muted-fg);
  font-size: 12px;
  font-weight: 600;
}

.ai-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}

.ai-filter {
  padding: 0.48rem 0.72rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: rgba(var(--ink-rgb), 0.65);
  font-size: 12px;
  font-weight: 600;
}

.ai-filter.is-active {
  border-color: #d8eb5e;
  background: #efffa0;
  color: #121313;
}

.ai-video-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.ai-card {
  min-width: 0;
}

.ai-card__link {
  display: block;
  color: inherit;
}

.ai-card__media {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #e6e2d8;
}

.ai-card__media--pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: #0d0e0d;
}

.ai-card__panel {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #171817;
}

.ai-card__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ai-card__label {
  position: absolute;
  left: 0.45rem;
  bottom: 0.45rem;
  padding: 0.24rem 0.38rem;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.ai-card__label--remake {
  background: rgba(212, 255, 76, 0.88);
  color: #101110;
}

.ai-card__duration {
  position: absolute;
  right: 0.45rem;
  bottom: 0.45rem;
  padding: 0.24rem 0.38rem;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.ai-card__title {
  overflow: hidden;
  margin: 0.62rem 0 0.2rem;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-card__author {
  margin: 0;
  color: var(--muted-fg);
  font-size: 11.5px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 1.5rem;
  color: var(--muted-fg);
  font-size: 13px;
  font-weight: 600;
}

.back-link:hover {
  color: var(--fg);
}

.ai-detail {
  max-width: 1180px;
  margin: 0 auto;
}

.ai-detail__head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.ai-detail__head h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(2rem, 4.8vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.ai-detail__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.9rem;
  color: var(--muted-fg);
  font-size: 13px;
  font-weight: 600;
}

.ai-detail__tag {
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: rgba(var(--ink-rgb), 0.06);
  color: rgba(var(--ink-rgb), 0.7);
}

.ai-player-grid {
  display: grid;
  gap: 0.8rem;
}

.ai-player-grid--pair {
  grid-template-columns: 1fr 1fr;
}

.ai-player {
  margin: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #0e0f0e;
}

.ai-player video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  object-fit: contain;
}

.ai-player figcaption {
  padding: 0.7rem 0.9rem;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  font-weight: 600;
}

.ai-post-text {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(var(--ink-rgb), 0.025);
}

.ai-post-text blockquote {
  margin: 0.8rem 0 0;
  color: rgba(var(--ink-rgb), 0.78);
  font-size: 15px;
  line-height: 1.65;
  white-space: pre-line;
}

.ai-related {
  margin-top: 3.5rem;
}

.ai-skill-link {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: inherit;
  background: rgba(var(--ink-rgb), 0.025);
}

.ai-skill-link img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.ai-skill-link span {
  display: block;
  padding: 0.7rem 0.8rem;
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 1050px) {
  .ai-video-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .ai-collection-grid,
  .ai-video-grid,
  .ai-player-grid--pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ai-detail__head {
    display: block;
  }
  .ai-detail__head .btn {
    margin-top: 1rem;
  }
  .ai-pair-grid {
    grid-template-columns: 1fr;
  }
  .ai-motion-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .ai-collection-grid,
  .ai-video-grid,
  .ai-player-grid--pair {
    grid-template-columns: 1fr;
  }
}

.detail-card {
  position: sticky;
  top: 6rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
}

.detail-price {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-fg);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail-hint {
  margin-top: 0.5rem;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted-fg);
}

.detail-ready {
  padding: 0.75rem;
  border-radius: 12px;
  background: rgba(244, 255, 113, 0.35);
}

.detail-ready-title {
  font-size: 13px;
  font-weight: 600;
}

.detail-list {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--hairline);
  font-size: 12.5px;
  color: rgba(var(--ink-rgb), 0.62);
}

.detail-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.detail-tool {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.5rem 0.25rem 0.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}

.detail-tool img {
  width: 16px;
  height: 16px;
}

.detail-related {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--hairline);
}

.detail-related-title {
  margin-bottom: 1.25rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

@media (min-width: 900px) {
  .detail-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
  }
}

@media (max-width: 639px) {
  .user-chip__name {
    display: none;
  }
}

/* --- long-form pages (pricing, about, refund, contact, guides) ------------- */

.prose {
  max-width: 68ch;
  margin: 0 auto;
  padding: 56px 0 80px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--fg);
}

.prose h1 {
  font-family: var(--font-brand);
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 10px 0 24px;
}

.prose h2 {
  font-family: var(--font-brand);
  font-size: 24px;
  line-height: 1.25;
  margin: 40px 0 12px;
}

.prose h3 {
  font-size: 18px;
  margin: 28px 0 8px;
}

.prose p,
.prose li {
  color: var(--fg);
}

.prose ul,
.prose ol {
  padding-left: 1.25em;
  margin: 12px 0;
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li::marker {
  color: var(--muted-fg);
}

.prose li {
  margin: 0.35em 0;
}

.prose a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--muted);
  padding: 0.15em 0.35em;
  border-radius: 4px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.95em;
}

.prose th,
.prose td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.prose th {
  font-weight: 600;
}

.prose blockquote {
  margin: 24px 0;
  padding: 12px 18px;
  border-left: 3px solid var(--accent);
  background: var(--panel);
}

.prose--faq {
  padding-top: 8px;
}

.faq__item {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

.faq__item summary {
  cursor: pointer;
  font-weight: 600;
}

.faq__item p {
  margin: 10px 0 0;
  color: var(--muted-fg);
}

.pricing--page {
  padding-top: 24px;
}

.pricing--page .pricing__head {
  text-align: center;
  margin-bottom: 28px;
}

.learn-group {
  margin-top: 44px;
}

.learn-blurb {
  color: var(--muted-fg);
  margin: 6px 0 14px;
}

.learn-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.learn-list li {
  border-top: 1px solid var(--border);
  padding: 12px 0;
}

.learn-list a {
  font-weight: 600;
  text-decoration: none;
}

.learn-list li span {
  display: block;
  color: var(--muted-fg);
  font-size: 14px;
  line-height: 1.5;
  margin-top: 2px;
}
